In Drupal 7 I want to have a site that has distinct sections with a left navigation menu that switches based upon the page you are on. For example I want to have a top level nav that takes you to a section, and then in that section the menu is unique for it. I’m assuming I have to create a theme function in my template.php file to handle this. Can someone give me an idea of how to start coding this?
Share
I’m not 100% sure I follow you but if I do then you could do this with the Menu Block module – http://drupal.org/project/menu_block
If you’re talking about levels:
If you’ve got a menu with multiple levels but only want to show say the 2nd level on pages where the parent item has a 2nd level then you go to structure -> blocks -> new menu block and the select the menu you want, what menu level to start the menu from and then add it where you want as a regular block.
An example is:
Your main menu will show just menu items at level one.
Your menu block will be set to just start from level two, so if you were on Menu item 2’s page, your menu block would display the second level menu items.
If you’re not talking about levels:
You can make separate menu blocks and then set them to only appear on certain pages by going to the block’s visibility settings, then typing the node alias of the page you want it to appear on and select “Only the listed pages” from the radio buttons.