I am trying to accomplish something similar to the book navigation module.

Say I create a block containing a menu. I want this block to become visible for nodes that belong to this menu.

So if NodeA belongs to the menu "My SubMenu 1", which is included in a block called "My Submenu 1 Block", I want this block to appear everytime NodeA comes up.

This could be accomplished with some pathauto tricks, or assigning a certain taxonomy term to all nodes of "My Submenu 1". But I realise this is redundunt, there is no need to force the user to create content with specific terms--the information is all there in menu-->node connection.

2 Answers 2


Take a peek at http://drupal.org/project/menu_block. I think it might do what you want, or, if not, at least maybe its code might give you an idea on how to do so yourself.

  • 3
    Menu block does exactly this. In your menu block's configuration, for the 'Fixed parent item' option select 'the menu selected by the page.' Then be sure to enable which menus can be enabled for that option at admin/config/user-interface/menu-block.
    – Dave Reid
    Commented Jan 11, 2012 at 7:02
  • thanks jimajamma @DaveReid and @mtro! great advice, you saved me from a lot of headaches.. Commented Jan 11, 2012 at 12:44

Context module does exactly this. If you chose a "menu" condition, it will allow you to show blocks, menus, etc only for content that is listed in the menu.

  • thanks for your answer--I haven't tried either menu_block or Context yet, but it seems that menu-block is a bit more specialized towards my end. I could be wrong, but I will grant the answer to menu_block for now Commented Jan 11, 2012 at 12:35

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.