Welcome Guest, Not a member yet? Register   Sign In
Using dynamic menus with Codeigniter?
#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.


Messages In This Thread
Using dynamic menus with Codeigniter? - by El Forum - 01-04-2009, 03:36 PM
Using dynamic menus with Codeigniter? - by El Forum - 01-04-2009, 11:57 PM
Using dynamic menus with Codeigniter? - by El Forum - 01-05-2009, 02:39 AM
Using dynamic menus with Codeigniter? - by El Forum - 01-05-2009, 03:05 AM
Using dynamic menus with Codeigniter? - by El Forum - 01-05-2009, 07:59 AM
Using dynamic menus with Codeigniter? - by El Forum - 01-05-2009, 08:55 AM
Using dynamic menus with Codeigniter? - by El Forum - 01-05-2009, 09:04 AM
Using dynamic menus with Codeigniter? - by El Forum - 01-05-2009, 09:20 AM
Using dynamic menus with Codeigniter? - by El Forum - 01-05-2009, 09:30 AM
Using dynamic menus with Codeigniter? - by El Forum - 01-05-2009, 09:35 AM
Using dynamic menus with Codeigniter? - by El Forum - 01-06-2009, 12:15 PM
Using dynamic menus with Codeigniter? - by El Forum - 01-06-2009, 04:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB