Welcome Guest, Not a member yet? Register   Sign In
Keeping parent menu items active in child pages
#4

(11-16-2014, 12:32 PM)alroker Wrote: I use a My_Controller to render my views within a universal template view that has my nav in it. Then from within a controller I have a var called page_name that I can set with the nav name. That gets passed to the template view when rendered. Then in template view I use a shorthand IF to say if page_name = the name of my nav item, set the css class to active. Hope that makes sense. I don't have time right now to show code.

i do something very similiar, but instead of additional shorthand IF blocks i echo out the $page_name variable to the Javascript (jquery based menu system) there is an option in the menu system i use that is: active_menu: 'MENUID/CLASSNAME'.
Reply


Messages In This Thread
RE: Keeping parent menu items active in child pages - by Hobbes - 11-17-2014, 12:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB