For example, I have two menus.. one is primary links (the target of menutrails), and the other is a left navigation.

If the current item appears in the left navigation, then the css class won't be added to primary links.

Here's a patch that fixes the problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chellman’s picture

I had the same issue, where some nodes are under secondary-links instead of primary-links. This patch seems to have fixed that problem.

I have the Menutrails menu set to Primary Navigation, but this allows nodes that aren't under there to be marked. Good stuff.

I assume we need more than just one reviewer before it's RTBC?

sun’s picture

Hm. Shouldn't both (or all) items in all menus be marked active?

maxray’s picture

Status: Needs review » Reviewed & tested by the community

This fix worked a treat for me.

jrabeemer’s picture

sub

sun’s picture

Title: Menutrails assignment fails if menu item is in ANY active trail.. » Menutrails assignment fails if menu item is in any menu
Status: Reviewed & tested by the community » Needs review

I still need clarification on #2

Bartezz’s picture

All items in all menus being marked active... not sure what is meant by this but I think I've a similar situation;

For example a menu:

- bicycles
--- unicycles
--- atb
--- bmx
- colors
--- red
--- green
--- blue

I have a node-type in which people can set a single term for two taxonomies.
Now one term is connected to - atb and one term is connected to - red

This results in kinda random submenuitems being active... one time atb is active on the next node it might be red.
I thought it had to do with taxonomy weight but this doesn't seem to do much difference.
Edit: this was a misconfiguration on my part, the taxonomy weight is the determing factor in which menu item is being set to active

But would it be possble to have both atb AND red active in the menu?

Cheers

PS, sorry if this is completely unrelated didn't mean to hijack if this is the case...

nedjo’s picture

TidalWave’s picture

FileSize
2.17 KB

Seeing how my issue was marked duplicate, I'll post my patch here.
Its a patch which allows you to select items from different menu's

Instead of just selecting primary links from the drop down and coupling contenttypes to underlaying menu items,
you can now select multiple menu's and link between em.
If you select Primary Links & Service Links as your menu the dropdown at a contenttype would look like:
Primary Links
-- Page 1
-- Page 2
-- Page 3
Service Links
-- service link 1
-- service link 1
-- service link 1

This allows you to link several contenttyoes to different menu's

Abit more flexibility.

bluesherpa’s picture

Reposting in this thread, just in case the other is ignored....

I installed the latest dev and ran this patch - no luck. It didn't solve the problem for me.

There is a primary menu item named Portfolio that has two sub-menu items called Websites and Articles. Like this:

Primary
- Home
- Portfolio
-- Websites
-- Articles

Articles points to portfolio/articles, which is supported by a view that lists content of type articles
Websites points to portfolio/websites, which is supported by a view that lists content of the type websites

If I point Portfolio to , the Websites menu item is highlighted when I view a node of type website.
If I point Portfolio to portfolio/websites, the Websites menu is NOT highlighted when I view a node of type website.

I found a temporary workaround by configuring the Portfolio link as an external href http://www.mysite.com/portfolio/websites

scarvajal’s picture

I was victim of the bug described in #9.
Subscribing.

lucuhb’s picture

I encounter the same problem on version 6.1.1: if the node is part of another menu that this set in the menu trail (in my cas primary links), the active css class is not applied on the primary link menu item.
The solution indicated in menutrails-multimenu.patch of this issue (http://drupal.org/files/issues/menutrails-multimenu.patch) solves the problem. Thanks !

Bartezz’s picture

Version: 6.x-1.0 » 6.x-1.1
Status: Needs review » Reviewed & tested by the community
FileSize
901 bytes

Applied patch in #1 by hand against 6-x.1.1 and it works fine.
Hereby a patch against 1.1... tested on two production sites.

Cheers

sultancillo’s picture

Tested the patch it does set the active trail to the correct item...

I have a page on a menu. the page is categorized in a taxonomy term that is set on menutrails to set the active menu to an item in the primary links. The page's menu item has children...

With this patch the active trail is correctly set but the menu item for the page does not get expanded....

i hope i made myself clear.

Bartezz’s picture

Noticed this to... 'active-trail' is added as class not 'active' if I'm not mistaken...
But isn't this how the module should behave anyway?

sultancillo’s picture

Perhaps this is a limitation of Drupal: only one menu can have the active trail set at a given time... so if you're setting the active trail to your main navigation menu then it cant be set to anything else at the same time.

rkendall’s picture

I'm not sure if all of the issues that have been marked as duplicates of this issue really are duplicates. It seems like there are about 3 (or more) different kinds of problems being described.

Perhaps they should be separated again so that we can actually get something fixed?

sun’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for reporting, reviewing, and testing! Committed to 6.x.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

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