We help IT Professionals succeed at work.

Drupal - Displaying menu trails for disabled menu items from page view

talonv
talonv asked
on
510 Views
Last Modified: 2012-05-09
In Drupal, if a node is added to the menu and then disabled via the menus admin interface, the menu active trail will still point to the node. ie. Node A -> Node B -> Node C (disabled), when viewing node C, the active trail will show from node A to node B. This is desirable.

My problem arises from a view (from the common Views module) that is configured to display as a page and references a node from an argument - I wish to be able to set the menu hierachy so that it shows the active trail like it would on a normal node, as detailed above.

Any direction on how to go about this?
Comment
Watch Question

I'm sorry, I don't understand the explanation of the problem.
Probably this is related to "active trail". I thought that meant that a CSS id was added to a menu link, so one can theme the "active" menu entry.

This in turn means I don't understand the connection between your view, and the active trail.

Please elaborate if possible.

Author

Commented:
Thanks for your comment.

My question doesn't relate to styling the active trail, more providing a custom menu trail for a view. I can set menu options correctly for a node correctly, but not for views.
Oh, the view is linked to from the menu, but the menu doesn't reflect this when the view is being viewed?

Author

Commented:
The view would be linked to from the menu but is disabled and linked to by content; we can't have a third-level item on the menu, but want some pages to have a menu trail as if they are.
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
I'm sorry that I still don't really understand your question, but I would strongly recommend leaving the question open for another expert to consider it. Altering menu.inc is strongly discouraged since it's going to cause you problems when upgrading Drupal in the future.

Since you did manage to solve the problem, you could try doing the same thing with Drupals hook system.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.