Working with Menus: Administration Form (Drupal 5)

Menus are the key to your site – they're the way by which visitors get at your content.

A menu is a list of links to content. Menus can appear in a horizontal line at the top of your pages, as with many web site designs. Or they can appear along the sides in blocks, another common design.

A specific link in a menu – a "menu item" – can link to a specific node. Or, calling on the full power of the database behind your site, it can pull up a list of nodes based on some criterion.

There's a big administration form for all menus on your site:

Navigation » Administer » Site building » Menus

At the top of that form, you'll see four tabs: 'List', 'Add menu', 'Add menu item', and 'Settings'. An overview of the tabs:

List

This form lists every menu currently created for your site. Immediately under the menu's name are one or more options:

Edit

This brings up a form that lets you change the name of the menu. That's it.

Delete

If the menu is one that you, and not the Drupal system, created, you can delete it from here.

Add item

This is an important one: it lets you add a new menu item to the menu. The link takes you to the 'Add menu item' tab; see Add menu item below.

list of menu items

Under the above choices is a list of the items – the links – in the menu. Its columns are:

Menu item

The name of each item. Clicking on an item's name simply activates that link, the same as selecting it in an actual menu.

Expanded

The 'Expanded' column refers to how sub-menus appear. A menu item can have multiple menu items beneath it as a sub-menu. See the Navigation menu for a perfect example: the item 'Administer' has a sub-menu 'Site building' below it, which in turn contains items like 'Blocks'. If a submenu is expanded, then it will appear with its contained items visible. If it is not expanded, then a viewer will have to click on the submenu to see its contained items.

Operations

The 'Operations' column has links to edit, disable, or delete a menu item.

Editing a menu item follows the same procedure as creating one. See Add menu item below.

Disabling a menu item is a useful technique. It takes the item off of the visible menu, but retains it on the administration form, where you can easily enable it again later.

Finally, deleting a menu item removes it for good.

Add menu

There's not much under the Add menu tab: just a field to input the name of a new menu. This is for creating a menu as a block. The new menu will appear on the Menus administration form as only a name, with no items underneath; you'll then want to add menu items.

Once that is done, you're ready to have the menu appear on the site. Head to the Blocks administration form, find your new menu's block under the Disabled list (it'll have the name you created for your new menu), and place it on the page where you like.

See Working with Blocks and Placing Menus on Your Page.

Add menu item

This is where you add a menu item – a link to content, whether a node (or list of nodes) within your site, or an external URL (such as a page on another website).

Here are the fields on the form:

Translations

You'll see this option if you have multilingual capabilities installed in your site. For each of the active languages, you can insert a custom title and description (see explanations below). For example, if you have a menu item called "services", you can input "servicios" as a Spanish equivalent.

When a visitor switches languages, translated menu items will appear in the appropriate language.

Title

This is the name of the menu item, as it appears on the site: 'home', 'products', 'contact me', or what have you.

Description

Whatever you input here will appear as a "tip" when a visitor places the mouse pointer over the link ("hovers" over the link, as the techies term it). It's a good way to describe the link a little, without using a long title. For examples, hover your pointer over the links at the top of this page.

Path

This is the meat of your menu item: what does it link to? You can input any external link (such as http://www.google.com) or an internal link to content within your site.

Internal links are a big, rich topic. See Creating Links.

Menu items can be nested underneath other menu items (for example, menu items for several products, nested under an 'All Products' menu items). Normally, the nested "sub-menu" items appear only when the parent menu item is clicked. But if you check the 'Expanded' checkbox for your menu item, any sub-menu items nested under it will be visible within the menu, even without a visitor clicking.

Parent Item

Another important setting: what menu your menu item appears under. Click the drop-down menu. Available menus, and the menu items beneath them (indented with hyphens) appear.

Heirarchical (or "nested") menus are possible as well. "Sub-menus" – the "children" menu items of "parent" menu items – appear on the list, using deeper indentations.

Choose a menu's name to place your new menu item inside that menu. Or choose a "parent" menu item, to place your new menu item underneath it as a "child" sub-menu item.

Weight

Where in the selected menu will your new menu item appear? Set the "weight" for each item in the menu to order them: the "lightest" weight will appear first, and the "heaviest" weight will appear last.

For example, you might set the weight of a menu item 'main page' as -10, and a menu item 'contact us', as 10. The link 'main page' will appear first, and 'contact us' last. A menu item with a weight of, say, 0 will appear in between the two.

Settings

This form has a couple of settings related to site-wide handling of menus:

Primary and secondary links settings

Primary menu

Here you set an important item: your primary menu. Most web sites have one "main menu": a menu with important links for visitors like 'home', 'about us', 'links', and so on. Drupal gives this menu special treatment: most graphic Themes automatically display the primary menu, usually at the top of every page.

How do you create your primary menu? Easy:

1) Create a menu for the purpose, if it doesn't exist already. The items should generally be your most important pages or "sections", starting with 'home' (or 'main page' or 'front page' or whatever you prefer to call it).

Name this menu 'primary menu', 'main menu', 'site menu' or some such.

2) Open the 'Settings' tab (the topic of discussion here). Under 'Menu containing primary links:', choose the menu you created above.

When you click 'Save configuration', you'll now have a primary menu.

Secondary menu

What's a secondary menu? It's a special menu, like the primary one, that many Drupal graphic Themes reserve a special place for.

But many Themes don't display secondary menus, and a lot of Drupal users scratch their heads over what it's for. If you like, set a secondary menu here (as you did above for a primary menu), click 'Save configuration', and see whether anything shows up, and where.

There's an explanation on the Settings form: "If you select the same menu as primary links then secondary links will display the appropriate second level of your navigation hierarchy." In other words: If your primary menu has parent items with child items under those, then the parent items will show up in the primary menu location, and the first layer of child items will show up in the secondary menu location, when the appropriate parent item is selected.

It's easier to see than to explain. Give it a try.

Content authoring form settings

This setting is probably meaningless unless you are allowing multiple users to create new content, and menu items linking to that content. See Creating Menu Items on the Fly.

Comments

Yolanda's picture

Dοes your wеbsite haνe a contact page?
I'm having a tough time locating it but, I'd like to send you аn e-mail.
I've got some recommendations for your blog you might be interested in hearing. Either way, great site and I look forward to seeing it expand over time.

auto repair abbotsford wi's picture

Your site seems to be having some compatibilty problems in my opera browser.
The content appears to be running off the webpage pretty bad.

If you would like you can contact me at: mariam_macmillan@inbox.
com and I'll shoot you over a screenshot of the problem.

Add new comment