CodeIgniter Forums
Dynamic Navigation based upon route/controller? - 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: Dynamic Navigation based upon route/controller? (/showthread.php?tid=32355)



Dynamic Navigation based upon route/controller? - El Forum - 07-21-2010

[eluser]AndrewTurner[/eluser]
Hey Everyone,

I wanted your opinions on the best way to set a class on my navigation elements based upon the route or controller/function.

Would it be best to setup a new global function which would get the current URI, strip it and then check if there are any matches in my navigation container? (div containing an unordered list (with list items) holds my nav)

Or can anyone suggest a better way, or library/helper, etc?

Much appreciated.

Edit: Seems with some more broad search terms, I returned this: http://ellislab.com/forums/viewthread/93796/

Cheers,
Andrew