is it possible?

Below I have an attachment to this topic, please check it for being more clear on my question.

In attached snap i have a navbar with my categories listed in it. My page controller controls the data fetching according to category. Example: if user selects book he/she gets relevant articles in books. My home page displays every recent articles written with a short description of date, however for this question purpose added a category link there.

I want to know if we can navigate to tab book when clicked in category:book from below article.

Is there any possible way to make this? I assume it to be dynamic, like when article is listed from database in pages. this category field should automatically get filled with right category.

My database structure is:

I have two tables

1> category

2> page

category_id is foreign key in page table. every articles are kept in page table while category is only kept in category table.

I’m sorry but can you rephrase your question? Also, I can’t read what you’re trying to explain there in your image attachment.

Its easy my friend, just try to understand it correctly.

  1. create a relation in your model Post that connects you to the category and than you may get the category like $post->category->title…

  2. and than create an action can say actionCategoryData($catid) and using that catid you can get filtered data from database and list that in you view.

  3. now you may link your category title to above action like post/categorydata/id/123 and thats all.

let me know if you still have any confusion.

Regards