0

I have a News menu item, which then has children. I need it to be expanded if it is on a news article page, but not expanded on other certain pages.

I'm not sure which hook to use. i've played around with menu_link_alter but i can't figure out how to choose the item i'm on in order to process it. Maybe this isn't the correct way.

Any ideas please?

2 Answers 2

0

You can try one of these:

1
  • Someone showed me menu_position and that's the method i ended up using and it works.
    – dilios
    Commented Mar 20, 2014 at 15:44
1

I would go with the context module.

You can set a context to be active whenever a certain content type is shown, in this case, an 'Article'.

You can then set the reaction to 'menu' and choose an item which will get an active trail. You can then target using CSS or more likely, it's probably already expanded.

https://drupal.org/project/context

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.