WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • keeping parent nav "active" and parent's subnav showing
  • Print
Pages: [1]   Go Down

Author Topic: keeping parent nav "active" and parent's subnav showing  (Read 4248 times)

ImageMagician

  • Guest
keeping parent nav "active" and parent's subnav showing
« on: March 05, 2009, 10:02:24 PM »
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?
Logged

apple

  • Guest
Re: keeping parent nav "active" and parent's subnav showing
« Reply #1 on: March 05, 2009, 10:15:28 PM »
I have found this site useful for SM_2

http://code.jellycan.com/sm2test/

Apple
Logged

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: keeping parent nav "active" and parent's subnav showing
« Reply #2 on: March 06, 2009, 05:51:33 PM »
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) [Select]
#nav li.menu-current , #nav li.menu-parent {
  background: #a1a2a4;
}
should work.

Ruud
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • keeping parent nav "active" and parent's subnav showing
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2