Drupal Menus
By default, content on a Drupal site is not automatically placed in any particular structure. When creating a node, you don't choose where on the site it should be. You create it, and then other parts of Drupal can make it appear as a subpage to a particular menu item, in a list in a particular section, or as a part of another structure.
The most direct way of bringing structure to your Drupal site is to use menus. These are links collected in a tree structure.
Note: The initial version of this section of the Community Documentation came from the book Drupal 7: The Essentials, courtesy of NodeOne and Johan Falk
A standard installation of Drupal has four initial menus: main menu, management, navigation and user menu. More menus can be added via Drupal's interface, and you can also choose where and how they should be displayed.
Displaying Menus
There are, in principle, two ways of displaying menus:
Each menu on the site has its own block, which can be placed in a region just like any block.
The theme on the site can (but does not always) have two places where menus are displayed in a special format – main links and secondary links. In a standard Drupal installation, the main links are displayed as large white tabs against the blue header, while the secondary links are displayed as discrete links in the upper-right corner of the site.
Which menus should be used for main links and secondary links can be changed at the toolbar's Structure link, in the Menu and Settings tabs.
TIP: The display of main links and secondary links only hold one level of menu links. Submenu items are not shown. It is possible to use secondary links to display subitems of the primary menu by configuring them to fetch links from the same menu. The Menu block module provides further possibilities to display selected levels and parts of a menu..
Creating and editing menu links
As with many other administration tasks, there is an overview for managing menus. It can be found by going to the toolbar and selecting first Structure and then Menus, and it displays all the menus available on your site. (See figure 4.1) Each menu presents three options.
- List links: This gives you a list of all items in this menu, and is usually what you want to do when managing a menu.
- Edit menu: This allows you to change the name and description of the menu itself (not the links it contains). You may also delete any menus you have created yourself.
- Add link: This leads to a page for adding another link in the menu. See details below.
Figure 4.1: The menu overview can be found in Structure, Menus.
At the top of the list of menus is an Add menu link used for adding further menus. The only difference between menus that you create yourself and those provided by modules (or the standard installation) is that your custom menus can be deleted.
Creating menu links for nodes
Last updated June 13, 2012. Created by Itangalo on May 13, 2012.
Edited by kwseldman. Log in to edit this page.
A quick and easy alternative when creating menu links is to use the menu options available on node edit pages, under Menu settings. If the Provide a menu link option is checked, a number of new options become available (see figure 4.3). All settings are similar to the menu item configurations described in the previous section.
Figure 4.3: You can create menu links to nodes right from the node's edit form.
By default, articles and basic pages may only be placed in the Main menu. There are settings on each node type determining which menus should be available in the node edit form, as well as default settings for the parent item.
- Printer-friendly version
- Log in to post comments
- 3297 reads