![]() |
Using dynamic menus with Codeigniter? - 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: Using dynamic menus with Codeigniter? (/showthread.php?tid=14483) Pages:
1
2
|
Using dynamic menus with Codeigniter? - El Forum - 01-06-2009 [eluser]PermanaJ[/eluser] I think menu creation should be in a helper ... and also, you can create a menu based on user login. If the user has been login then show menu1 if not then show menu2 ... Using dynamic menus with Codeigniter? - El Forum - 01-06-2009 [eluser]Creative Stasis[/eluser] Code: <a href="#">uri->segment(1)=='home'?' class="active"':'')?>>Home</a> Slightly less code if you are to go that way... though this will hardcode your urls to the ones you specify. For instance if you change home to index, or main... you'll have to go in and change it in your code. Edit : Can't seem to get that code to edit.. <a href="#">uri->segment(1)=='home'?' class="active"':'')?>>Home</a> Edit again... Nevermind I can't get it to post the right code. It's removing all of opening tags. You're missing <=($this-> That's really annoying. |