I need to set an item in the main menu as active even though I'm using separate sub menu blocks. What is the best way to do this? Due to particular styling I cannot just put them under the Category headings (like breadcrumbs).

The problem I came across is that the main menu item isn't active, as it doesn't know that the user is in the sub category of it as there is no link back. I can't find a way to set a particular main menu link as class active.

2 Answers 2


You should look into menu position. You can set active menu trails based on path or node type and they have a simple api for extending the functionality.


You could also have a look at the Menu block module. It claims to fix the issue in Custom menus never receive an active trail. The creator of the module also have some blog posts about the module: Use Menus in Drupal 7? You Need Menu Block Module.

  • I apparently already had this module. I'm not sure it does exactly what I need it to. Cheers. Commented Jun 15, 2011 at 8:12

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.