CodeIgniter Forums
navigation / menu - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: navigation / menu (/thread-29729.html)

navigation / menu - El Forum - 04-19-2010

ive asked once before but no one replied, and it might be because i asked in a wrong why.

so, my issue is that i want to structure my menu in a specefic way.
I would like to be able to make a ‘active’ class on the current page im on, so that it has a special class on it, but how do i get to know that this certain pageg is active? Before CI i just did the basename() and if that was it, it had a class on it.
But how do i do it with CI , in a smart way.
also if i would like to have more levels in my menu, so if im under lets say profile: then it shows
-edit text
-change password

and if im clicking on another page it goes for that page.

Anyone konw anything about that?

Plz let me know.

Or how have you done it ?

navigation / menu - El Forum - 04-19-2010

This would largely depend on how your application is structured. You could set a variable in your controller methods and use it in your view. You can also check various $_SERVER variables from within the code that generates your navigation.