el-sid Posted July 8, 2010 Share Posted July 8, 2010 Hi, I have two tables: category and articles. They have a one-to-many relationship. category: id, name, is_menu[true/false] articles: id, category_id, title, content what i do is i retrieve all items in the category table that have is_menu set to true, to create a menu item. The idea should be that when i click on the menu, the page should show me the latest article from that category. on the sidebar, it should show me links of other article titles within that category. something like this: http://www.uapkenya.com/about-uap/ does anyone know how to go about this? I don't need you to show me code, just some pointers on how to go about it. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/207105-howto-create-context-sidebar-menus/ Share on other sites More sharing options...
el-sid Posted July 9, 2010 Author Share Posted July 9, 2010 anyone please Link to comment https://forums.phpfreaks.com/topic/207105-howto-create-context-sidebar-menus/#findComment-1083481 Share on other sites More sharing options...
PravinS Posted July 9, 2010 Share Posted July 9, 2010 As while retrieving categories you will have a loop which will display categories. Now in that loop fetch the articles related to the category id and display below it. Link to comment https://forums.phpfreaks.com/topic/207105-howto-create-context-sidebar-menus/#findComment-1083496 Share on other sites More sharing options...
el-sid Posted July 9, 2010 Author Share Posted July 9, 2010 As while retrieving categories you will have a loop which will display categories. Now in that loop fetch the articles related to the category id and display below it. thanks. al try it out Link to comment https://forums.phpfreaks.com/topic/207105-howto-create-context-sidebar-menus/#findComment-1083519 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.