Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#12 | menutrails-multimenu.patch | 901 bytes | Bartezz |
#8 | menutrails.patch | 2.17 KB | TidalWave |
menutrails-multimenu.patch | 871 bytes | IncrediblyKenzi |
Comments
Comment #1
chellman CreditAttribution: chellman commentedI 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?
Comment #2
sunHm. Shouldn't both (or all) items in all menus be marked active?
Comment #3
maxray CreditAttribution: maxray commentedThis fix worked a treat for me.
Comment #4
jrabeemer CreditAttribution: jrabeemer commentedsub
Comment #5
sunI still need clarification on #2
Comment #6
Bartezz CreditAttribution: Bartezz commentedAll 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...
Comment #7
nedjoI've marked #861346: Support of multiple menu's and #630296: "Give first priority to the selected menu" doesn't work duplicates.
Comment #8
TidalWave CreditAttribution: TidalWave commentedSeeing 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.
Comment #9
bluesherpa CreditAttribution: bluesherpa commentedReposting 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
Comment #10
scarvajal CreditAttribution: scarvajal commentedI was victim of the bug described in #9.
Subscribing.
Comment #11
lucuhb CreditAttribution: lucuhb commentedI 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 !
Comment #12
Bartezz CreditAttribution: Bartezz commentedApplied 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
Comment #13
sultancillo CreditAttribution: sultancillo commentedTested 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.
Comment #14
Bartezz CreditAttribution: Bartezz commentedNoticed 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?
Comment #15
sultancillo CreditAttribution: sultancillo commentedPerhaps 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.
Comment #16
rkendall CreditAttribution: rkendall commentedI'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?
Comment #17
sunThanks 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.