![]() |
implementing a common account bar - 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: implementing a common account bar (/showthread.php?tid=4976) |
implementing a common account bar - El Forum - 12-28-2007 [eluser]AtlantixMedia[/eluser] Hello, ok, I'm in the process of implementing a control panel system where a navigation bar would be shown across all pages. the bar would have the following items: 1)My Account 2)My Ratings 3)My Items etc every section is gonna have its own controller, and the navigation item the user is browsing will have to be kind of highlighted on the bar. how would you implement this without having to recreate the bar on each controller? thanks implementing a common account bar - El Forum - 12-28-2007 [eluser]gon[/eluser] You could have the account bar markup in a separate view. This view should get as data the section, and render the bar accordingly. Code: function show_section() { You can build a helper that does get the account bar HTML automatically, if you don't want to repeat the code on every controller. |