Navigation with Parent ids for pages - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Navigation with Parent ids for pages (/showthread.php?tid=58325) |
Navigation with Parent ids for pages - El Forum - 06-03-2013 [eluser]the_unforgiven[/eluser] Hi All, Help required on how to achieve the following: I have a sidebar navigation, and i have setup the database to include a parent, so how can i code it so that it only shows in the navigation if the parent has children in like a jquery accordion type style. So i have a list in my nav for example Home About Services Contact But then the client adds a new page under services called test for example the navigation would then look like Home About Services (then on hover of services it expands to show the test page) Test Contact So how would one achieve this ? Here's all my code so far so maybe someone can help me. Code: Controller: Code: Model: Code: View: Attached image show the database setup, can someone please help me acheive this? Thanks in advance Navigation with Parent ids for pages - El Forum - 06-05-2013 [eluser]the_unforgiven[/eluser] Help greatly appreciated on this please? Navigation with Parent ids for pages - El Forum - 06-05-2013 [eluser]jairoh_[/eluser] it's hard to tell with your codes and your database structure could be different from ours. just make some logic and algorithms for that. Navigation with Parent ids for pages - El Forum - 06-06-2013 [eluser]the_unforgiven[/eluser] Well that's not really helping me, i need help with the logic and everything to but in place, hence the forum post! :0 Navigation with Parent ids for pages - El Forum - 06-06-2013 [eluser]jairoh_[/eluser] can u post your db structure? Navigation with Parent ids for pages - El Forum - 06-07-2013 [eluser]the_unforgiven[/eluser] Db structure is shown in the first post has an image |