WebsiteBaker Support (2.8.x) > Templates, Menus & Design
keeping parent nav "active" and parent's subnav showing
(1/1)
ImageMagician:
In my menu structure, I am having root navigation across the top with sub-navigation along the left side. Right now, it's working where if I have sub-pages for a page, the sub-navigation shows up just fine.
My problem is, if I click on one of the sub pages, the "active" state on the top navigation goes away, and so does the sub-nav menu.
I'm using show_menu2. Is there a way to tell a page to keep its parent sub-navigation as well as the active state on the parent's menu link?
apple:
I have found this site useful for SM_2
http://code.jellycan.com/sm2test/
Apple
Ruud:
If you use the default settings in show_menu2 (generating the standard classes) you should have a menu-parent class whenever you are in a child-page. You should use that to highlight the parent of the current page.
Something like:
--- Code: (CSS code to higlight a top-menu) ---#nav li.menu-current , #nav li.menu-parent {
background: #a1a2a4;
}
--- End code ---
should work.
Ruud
Navigation
[0] Message Index
Go to full version