Last updated June 29, 2016. Created on May 9, 2005.
Edited by randell, ashish_nirmohi, kenisha.lehari, afinnarn. Log in to edit this page.

Menus are a collection of links (menu items) used to navigate a website. The Menu module provides an interface to control and customize the powerful menu system that comes with Drupal. Menus are primarily displayed as a hierarchical list of links using Drupal's highly flexible blocks feature. Each menu automatically creates a block of the same name. By default, new menu items are placed inside a built-in menu labelled Navigation, but administrators can also create custom menus.

Drupal 7


In Drupal 7, you can add, remove and rename menus and menu items/tabs. You can also configure a special block for a menu and you can specify the default menu to which new items will be added.

In many themes there are at least two menus, the Main (or primary) menu, and a secondary menu. The Main menu's links drive the main navigation structure for your site, and are often displayed prominently across the top or side of the site. The Secondary menu is often used for items like the copyright and privacy notices and are often displayed at the bottom or very top of the page in smaller text. You can specify which menus are used for the main and secondary links.

When adding or editing site content, you can also specify the content's menu item. You can specify a default menu for the content authoring form.

Each default or custom menu has a corresponding block. For more information on blocks, see Working with Blocks.


Creating a menu

Drupal 7 Menu Screen

  1. Navigate to the Menus page (Structure > Menus or
  2. Click Add menu.
  3. In the Title field, enter a title.
  4. In the Description field, enter an optional description.
  5. Click Save.

To learn how to add new menu items to the menu, read further on Adding a link to a menu. To add tabs to a menu see Creating menu tabs.

Enable the menu

Assuming you plan to add nodes to your menu and not just external links, you must enable it in the content type for the node(s) that will be the target of the menu's links. It is possible to add menu links that are not enabled this way through the Menus page. If you do, you will find that certain changes cause your link to disappear from the assigned menu. Menus can be enabled on multiple content types.

Drupal 7 Enable Menu

  1. Navigate to the content type for the node(s) (Structure > Content type or
  2. Locate the content type and click edit.
  3. Choose Menu settings.
  4. Click the checkbox of the menu(s) you want to enable.
  5. (Optional) Set the Default parent item to choose a default menu for the content type.

Specify the menus to use for main and secondary links

Menu Setting Drupal 7

  1. Navigate to the Menu settings page (/admin/structure/menu/settings).
  2. Specify any of the following settings:
    • Source for the main links: The menu that will provide the "main links". In many themes, the main links are displayed at the top of the page.
    • Source for the secondary links : The menu that will provide the "secondary links". In many themes, the secondary links are displayed at the bottom of the page.
  3. Click Save configuration.

Renaming menus

  1. Navigate to the Menus page (/admin/structure/menu).
  2. Click Edit Menu.
  3. In the Title field, enter a new title.
  4. Click Save.

Note: The default menus cannot be renamed.

Removing a menu

  1. Navigate to the Menus page (/admin/structure/menu).
  2. Click Edit Menu.
  3. Click Delete.
  4. Click Delete again to confirm.

Note: The default menus cannot be deleted.

Expanding Menus

If you have hierarchical menu items within a menu and you'd like to show the submenu items, on each parent menu item's edit page, check Show as expanded and save. This only affects the immediate children below the menu item. That is, if you have 3 levels of menu items, checking Show as expanded on the first tier items will only show the second tier items, not the third tier items. For example:

  • First tier menu item 1
    • Second tier menu item 1 (only shown if First tier menu item 1 has Show as expanded selected)
      • Third tier menu item 1 (only shown if Second tier menu item 1 has Show as expanded selected)
      • Third tier menu item 2 (only shown if Second tier menu item 1 has Show as expanded selected)
    • Second tier menu item 2
  • First tier menu item 2
  • First tier menu item 3

Note: The default Bartik theme might appear to not follow the "show as expanded" rule as explained above for the main menu in the header, but you can place that menu in other regions and see the expected behavior. Just note that themes can have implementations that seem to deviate from the rule.

Drupal 6 and earlier

In Drupal 6 and earlier, themes generally provide out-of-the-box support for two menus commonly labeled "primary links" and "secondary links". These are sets of links which are usually displayed in the header or footer of each page (depending on the currently active theme). Any menu can be designated as the primary or secondary links menu via the menu settings page.


  • On the Menu administration page, administrators can "edit" to change the title, description, parent or weight of a menu item. Under the "Enabled" column, click on the checkbox to toggle a menu item on or off. Only menu items which are enabled are displayed in the corresponding menu block. Note that the default menu items generated by the menu module cannot be deleted, only disabled.
  • Use the "add menu" tab to submit a title for a new custom menu. Once submitted, the menu will appear in a list toward the bottom of the administer menu page underneath the main navigation menu. Under the menu name there will be links to edit or delete the menu, and a link to add new items to the menu.
  • Use the "add menu item" tab to create new links in either the navigation or a custom menu (such as a primary/secondary links menu). Select the parent item to place the new link within an existing menu structure. For top level menu items, choose the name of the menu in which the link is to be added.

Menu administration options:

  • Administer menus at Administer > Site building > Menus.
  • Add a menu at Administer > Site building > Menus.
  • Add a menu item at Administer > Site building > Menus > Add menu item.
  • Modify menu settings (in particular, to specify a menu to use for primary or secondary links) at Administer > Site building > Menus > Settings.
  • Manage menu blocks at Administer > Site building > Blocks.

Looking for support? Visit the forums, or join #drupal-support in IRC.


mgladding’s picture

Suddenly I am unable to enable more than one menu under menu settings. Any ideas on how this happened?

Narek’s picture

Is it possible to configure the menus the way that in expanding menus, the parent menu wouldn't be link to any thing but it would expend it's children?

let say we have a parent link called product which includes our products and when mouse hovers on it, it will show our products but user willn't be able to click on product link since it's not a link, it's just a category .

Thank You for your great job.

I find the solution here :

shamio’s picture

This module can help you to have deeper menu items. You can download ans install this module for Drupal 5, 6 and 7 here:

Russtavo’s picture

In your custom theme, if you want a main menu to be a drop down without using a module, you will need your parent menu items and all their children rendered on every page.

So in your themes template.php you need to add:

function YOURTHEME_links__system_main_menu($variables) {
    $pid = variable_get('menu_main_links_source', 'main-menu');
    $tree = menu_tree($pid);
	return drupal_render($tree);

Don't forget to substitute YOURTHEME for the name of your theme. In your page.php you will need at least:

<?php print theme('links__system_main_menu', array('links' => $main_menu)); ?>

Also, you need to go in http://yoursite/admin/structure/menu/manage/main-menu and ensure all your (parent) menu items are set to "Show as expanded".

Also, under http://yoursite/admin/structure/menu/settings you will probably want "Source for the Secondary links" to be set to something other than "Main menu".

If the above doesn't work it's probably because "Main menu" is not enabled in your theme settings under http://yoursite/admin/appearance/settings/yourtheme

Of course, you will need custom CSS and JavaScript to display as a drop down style.

sam2731’s picture

Thank you for your help, however, I cant seem to get it to work with the Zen theme. I place the print theme('links__system_main_menu', array('links' => $main_menu)); script at the very bottom of Zen's page.tpl and I placed

atgmain_links__system_main_menu($variables) {
$pid = variable_get('menu_main_links_source', 'main-menu');
$tree = menu_tree($pid);
return drupal_render($tree);

at the very bottom of my template.php file. I ensured all the setting above were correct and had no luck what so ever. Could it be a limitation of ZEN? Do I need another theme to get this to work? Can you make a recommendation? Any help would be greatly appreciated. Thanks

Winnifred777’s picture

I recently came upon a solution to this problem, and I hope it will help solve your problems also. I came upon it based on following this: . Ensure that all the menu items in their settings have checked "showed as expanded" as stated by @Russtavo.

In the CSS for the menu (as from's example), ensured that your menu ul styling is in principle like the following:

ul {
  float: left;
  margin: 0;
  padding: 0;
ul li {
  position: relative;
  float: left;
  list-style: none;
  list-style-image: none; /* DRUPAL!! */
  padding: .5em 1em;
  margin: 0;
ul li ul {
  display: none;
  position: absolute;
  width: 10em;
  left: 0;
  top: 1em;

ul li:hover ul {
  display: block;

The display:none; position:absolute and position:relative; are what are at work here. and You will notice that this is from their example. Ensure that the CSS document is properly linked to your page and I believe that this will work.

s-a-k-a’s picture

I really want a 3rd menu for all of my drupal independent of theme.

Here is explane something but this is not working or I make some mistakes..

999csharp’s picture


I installed this module. Then I added some content to intend it to appear in one of the main menus.

Since then I have been getting this error appearing under every one of my main menus :-
Notice: Undefined index: localized_options in menu_navigation_links() (line 1861 of /srv/bindings/3258d320935646ef836f34b38efab943/code/includes/

Would you know what causes this fault or is the module not intended to add content to menus?

Kind Regards

VM’s picture

web506’s picture

Best way to print menu name or menu title in a tpl ??

Gonzalo Garcia
Freelance Webmaster

VM’s picture