Looking for a way to keep menu items active, after link is followed

Nick_Haughton - February 3, 2009 - 21:20
Project:Dynamic Persistent Menu
Version:6.x-1.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello. I need some help getting dynamic persistent menu to do what I need it to do. First off, I have no experience of Javascript, a little of PHP and a fair bit of css. What I need the module to do is exactly what the "demo" site (linked to from the modules home) does. However, when I look at the css behind the demo, it seems completely different to anything in the module's css that I have.
I need the menu to keep the correct css when a button is pressed so that when the link is opened it remains active. Put another way I want to apply a different background color to the expanded menu item, and the sub-menu item, and have that stick after the link is opened so that you know where you are in the site. On the demo page this happens. On my page the menu item background color reverts to using "menu-menu-item a" css instead of "menu-menu-item a:active". Any hints?

#1

BuyBub.com - February 6, 2009 - 17:37

Subscribing Antivirus

#2

msgreenspike - May 3, 2009 - 13:54
Assigned to:Anonymous» msgreenspike

Hi,

I've managed to get the active menu to change color using the following CSS:

#block-dynamic_persistent_menu-0 ul li.expanded a.active
{
color:#96B0C9;
}

#block-dynamic_persistent_menu-0 ul li.expanded a.active
{
color:#96B0C9;
}

But only one menu item is marked class="active" -- if I click on a 2nd level menu its 1st level parent isn't marked active. I had a look at the sample website and it uses the category module. The 2nd level menu is a subcategory of the 1st level menu. I am wondering if this is how to get the 1st level menu to get marked "active"?

#3

msgreenspike - May 3, 2009 - 14:01
Assigned to:msgreenspike» Anonymous

#4

kuakuak - May 27, 2009 - 23:18

See this node: http://drupal.org/node/77485.
You just need to style the .active-trail class.

#5

yrocq - July 27, 2009 - 20:04
Status:active» fixed

dsm didn't set the active-trail class. If fixed it in the CVS (DRUPAL-6--1).

#6

System Message - August 10, 2009 - 20:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.