Welcome Guest, Not a member yet? Register   Sign In
Using dynamic menus with Codeigniter?
#11

[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 ...
#12

[eluser]Creative Stasis[/eluser]
Code:
<a href="#">uri->segment(1)=='home'?' class="active"':'')?&gt;>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"':'')?&gt;>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.




Theme © iAndrew 2016 - Forum software by © MyBB