set_active_nav ()
Friend, I have a problem and still do not know how to solve, could you help me? in option: set_active_nav (''), if he does not select a parameter field how can I solve this. Thank you.
The set_active_nav($url) helper simply checks if the given $url matches the current active route, i.e. the page that the user is viewing. If true then the function will return the string class="active"so that the approriate item in the navigation/menu is set active. Else, it returns an empty string.
I'm sure there are more elegant ways to do this, but it does the job.
I liked the idea that was, but I'll break your head a bit here, because I have this example: set_active_nav('admin/users') but when I use pagination url leaves users/ to users/2 so it loses reference , you know? but thanks.