NavMenu - set class via getCollectionName()
Permalink
I'm trying to configure a nav menu and need to set the active menu hilite based upon current page. Any coders out there who could help? I need to figure out the If statement to do this. Here's sample of two items. I need the "current" class set depending upon page.
Thanks
-Mark
Thanks
-Mark
I am not using the Header Nav function for this menu. It is coded in my template. CSS ID="Current" hilites the active menu name for the current page. I don't want to have to create a menu for every page to use the "Current" class. I tried creating a "nav-selected" class but no luck. This is probably not that difficult I'm just not a seasoned coder....Thanks for your help.
The idea is if page = current then the li CSS ID="Current" for that menu item else not.
The idea is if page = current then the li CSS ID="Current" for that menu item else not.
I am sure I am missing something, but couldn't you just tweak your css code to look for the nav-selected class?