How to make Primary Links "active" when on a sub_menu.
I've been searching for a way, in Drupal 5, to keep my $primary_links "active" when someone is browsing a "child" of the $primary_link. For instance, using Menus in Drupal I have my 6 $primary_links. In my $sidebar_left I have all my other menus being called by blocks. But I'd also like my $primary_links to remain active when someone is say reading a post or new story which has a node but may not exist as an menu item.
It seems a solution to this problem has been found for earlier versions of Drupal. (see http://drupal.org/node/46020). When I test this through 5, my $primary_links become arrays. Go figure...
I wanted to add some additional information in hopes that it may shed some light on this dilema. Currently I'm styling my links in the CCS, so if the link says something like
, I highlight all the "menu-1-4-2-active" links in my style sheet. The problem is that any children of the $primary_link do not provide any distinguishing attributes I can use identify to work with them with from CSS. Hopefully this sheds some more light on my challenge.
When someone helps me solve this problem, I'll donate $100 to Drupal ; )
Good luck!

sorry...
I styled this post without pre-viewing it. Hopefully this doesn't ban me from the Drupal forum for life.
More Research on this...
This looks to be a core problem for Drupal: http://drupal.org/node/77485
I even applied this patch in the includes/menu.inc file: http://api.drupal.org/api/function/theme_menu_item/5
The HTML showed no changes. This is the best description of the problem I've seen so far:
To make an example, when browsing "Accomodations" section in the following menu structure, everything works as expected:
. Accomodations
---Houses
---Condos
---Villas
but if you browse to "Condos" for example, you loose the *active* status for the parent menu item
and the result is:
. Accomodations
---Houses
---Condos
---Villas
while for good usability's sake it should be:
. Accomodations
---Houses
---Condos
---Villas
Still looking for an answer and hope to figure this out by Tomorrow morning.
Solved - Closed!
To achieve this result you need to create redundant menus under Primary Links. Then your primary links will be "active"
What do you mean by
What do you mean by "redundant menu"?
More details?
I'd also like to know the resolution to this issue. What are redundant menus? Does this fix require the includes/menu.inc patch that you mentioned earlier? Thanks.
Redundant menus ?
Hello,
I'm also interested in what you mean by "redundant menus".
And I also want to know if there is a way to fix this issue without hacking the core (menu.inc.php), something like a theme override function for example ?
Thanks in advance.
Come on!
Come on please don't giving clever clue to people and never come back. Come on please explain to us what is redudant menu.
Just another person looking
Just another person looking for an answer to this.
Sorry I didn't explain better.
OK, so you have primary-links and secondary-links, right? Well whenever I want the secondary-links and the primary links to be "active" I need to add my secondary-links to my primary-links. This makes them "redundant." Get it??? Just make sure they aren't expanded unless you need them to be.
Or I guess you could use Menu Trails. http://drupal.org/project/menutrails
Hi How to highlight primary
Hi
How to highlight primary and secondory menus when you are in the story or a page. I am using Zen and the menus are highlighted as long as I navigate in the site by clicking on the menus. But the primary menu is not highlighted and secondary menu not displayed when I am in a story or page. Any thoughts on how to fix it..
Thanks
zafer