Last updated June 27, 2013. Created by jstarbow on May 9, 2005.
Edited by deeparandad, Manjit.Singh, manish_mics, acmaintainer. 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 labeled Navigation, but administrators can also create custom menus.

Drupal 7

Uses

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.

Configuration

Creating a menu

Drupal 7 Menu Screen

  1. Navigate to the Menus page (Structure > Menus or http://example.com/admin/structure/menu).
  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 http://example.com/admin/structure/types).
  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.

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.

Configuration

  • 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 Drupal.org forums, or join #drupal-support in IRC.

Comments

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

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 :

http://drupal.org/project/special_menu_items

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

Doubt is the father of invention..... Hubmesh | download converter

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.

Thank you for your help, however, I cant seem to get it to work with the Zen theme. I place the

<?php
print theme('links__system_main_menu', array('links' => $main_menu));
?>
script at the very bottom of Zen's page.tpl and I placed

function
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

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..

http://drupal.stackexchange.com/questions/34351/how-to-add-extra-menu-so...

Hi

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/menu.inc).

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

Kind Regards
999csharp

Matthew
Learning Drupal by using: Acquia Dev Desktop
Theme : Garland
OS: Window 7
Current Modules downloaded and installed :-
Module Filter
Administration Menu
Media module
Media YouTube Module
Views

As stated on the doc pages comments form:

Is your comment a question or request for support? Take it to the forums. Questions are not answered here, and comments not providing useful information are removed.