Drupal: Getting another menu block
07/20/2009
(Applies to D6 & D7)
Drupal 6 only gives you one block for each of the menus. Here’s how you get another one for any of the menus.
- Login with permission to use (or enable) PHP input filter & create blocks.
- Go to Administer > Site building > Blocks.
- Click Add.
- Enter description and title as necessary.
- For the Block body:
- Choose PHP Code Input Format.
- Enter this code:
<?php
echo menu_tree('primary-links');
/*
* Other possible values for the parameter:
* 'navigation'
* 'secondary-links'
* 'admin_menu'
*
* See API function menu_tree() for details:
* http://api.drupal.org/api/function/menu_block/6
*/
?>
- Save the block.
- Apply CSS to theme as needed and enjoy.