Hi there,
I've gotten everything working with the menu trails module, except I had some nodes which would not do what I expected. I was table to track down the behavior when a Node is being edited, and a menu is defined on it. I think that menu might override the 'synthetic menu' provided by the menu trails module.
You can see an example on http://www.bebr.ufl.edu under the Publications Store tab. The 'archives' link on the side menu goes to a page with no tab active (incorrect), while the 'publications and products' link goes to a page that isn't listed in a side menu, and the tab is correctly active on that one. Those tabs at the top are our primary links.
How might I go about fixing this issue?
Comments
Comment #1
smithmb commentedIt looks like it doesn't even matter if the menu is shown in a block on the page or not. Simply associating ANY menu item with a page breaks the ability for menu trails to show a particular primary link as active. I'd like to display a menu link to a page somewhere AND have the primary links be active for a specific vocabulary.
I'm not sure yet if this is because the menu item I'm giving the page isn't part of the primary links menu hierarchy or if this bug happens with ANY menu item association to a page.
Comment #2
smithmb commentedJust to add even more info: It's type 118 that is being filtered out from the start. That is the custom menu type that I want used. So my first change was in
function menutrails_node_location($node)where I had to add 118 to the condition
if ($item['type'] == 4 || $item['type'] == 118) {.I'm now stuck in
function menutrails_primary_links($start_level = 1, $pid = 0)where I can't figure out why
if (in_array($cid, $trail)) {fails for my menu items.
Comment #3
smithmb commentedIt turns out if menus are not all descended from the primary links menu, this module does NOT always correctly show the trail. I had originally thought that was the entire purpose of this module, but I think I was wrong. I'd recommend the "Menu Block" module instead of using this with regular menus exposed as blocks.
As an aside, I did notice that if you delete a menu item that was assigned to menutrails in the admin interface, this module can't handle it, and throws PHP errors and kills the page.
Comment #4
kostask commentedI have the exact same issue
I am using Drupal 6.10 and using menu trails on node types.
If the page does not have a menu item it works fine. But if a page is assigned a menu item then menu trails does nothing.
What I am trying to achieve is rather simple: I want to have the category Works selected whilst the user is browsing the works sub-menu with varous works.
Browsing at the http://www.bebr.ufl.edu site I see that now it works as expected. Have you found any way to tackle this issue or have you abandoned menu trails using an alternative way to achieve this same effect?
Comment #5
caktux commentedI had the same problem and tried menu trails to fix it, however this seems like a core issue that menu trails would not be able take care of. I've post a patch here http://drupal.org/node/249571 that might help.