Default Menu Blocks
by Jeff Amaral
The Challenge:
Display the second level menu items of the currently active page, fully expanded, in the left sidebar of every page but the node edit form. And have this configuration saved in code so that every member of your development team can have it all work automatically.
Drupal menus allow you to hierarchically organize the content on your site. In Drupal 7, there are four system menus available by default: Navigation, Management, User menu, and Main menu. The Main menu is generally used for primary navigation (AKA the links generally shown at the top of every page).
All menus in Drupal can be displayed in one of two ways: as a variable in your theme settings or as a block. These blocks are limited. They will display the full menu (including top-level items) and, by default, only expand one of those top-level items if you are on a child page.
Want to show only the second level of the menu with the current page activated? Or the third? Want to expand all of the menu items so you can suckerfish them? You can’t.
Because of these deficiencies, lots of Drupal site builders turn to Menu Block, an incredibly popular and useful module....