When visitors come to your site, they need a way to get down into the various pages below the home page. Menus facilitate this traffic, by providing a series of links to guide them to major pages, as well as lower into subordinate pages.

This tutorial addresses how to configure menus. It looks at how to build more complex site navigation through the use of hierarchical menus and the configuration of sub-menus that only appear on subordinate pages. And, it shows how to create a blog roll for your site.

Configuring menu navigation

Menu navigation is accomplished through your site’s primary links. Primary links form a basic navigation layout, allowing you to guide visitors to the major pages on your site, such as the home page, blog page, media gallery, and contact form. The goal is that from any part of your site, visitors can find their way to the major page, and then work their way down from that point to the content they want.

When certain themes are active, the primary links appear at the top of the page. There is also a block that displays them, which can be placed in the preferred region for your site.

Note: Most of the primary and secondary links on your site require that you create related content before they become active and visible.

To add a menu item to your primary links, complete the following steps:

  1. In the admin menu, click Site information > Menus. The Menus page opens.
  2. Click the Primary links link. The Primary links page opens.
  3. Click the Add item tab.
  4. In the Path field, enter the URL for the page you want to link.
  5. In the Menu link title field, enter the title that you would like to appear as the link.
  6. [Optional] In the Description field, enter a note that tells where the link goes. This is the text that appears when visitors place the cursor over the link.
  7. Click Save.

Your menu item appears among the primary links. Anyone can now click it to reach the designated page.

Continue to add links for each of your major pages. Note that some links only appear when they are linked to actual content.

Note: Do not use the Navigation menu to create your links. Navigation is the default navigation for all your site permissions, according to user. You can place a separate block for these links on your site or disable it, from the Blocks page.

Using the Primary links block

If the theme for your site does not offer a menu bar for your primary links by default, you must place the Primary links block on your site in order for visitors to use them.

To place the Primary links block, complete the following steps:

  1. In the admin menu, click Site building > Blocks. The Blocks page opens.
  2. Find the Primary links block. Use the drop-down menu or the cross to move the block into the region of your preference.
  3. Click Save blocks.

The Primary links block is now active on your site.

Creating custom menus

In addition or as an alternative to the primary links, you can also create a custom first-level navigation.

You would do this if you would like a second arrangement of first-level links placed in a different region, or if you do not like the arrangement or style of the default banner provided by your theme.

To create a custom menu, complete the following steps:

  1. In the admin menu, click Site building > Menus. The Menus page opens.
  2. Click the Add menu tab.
  3. Enter text for the Menu name and Title fields.
  4. [Optional] In the Description field, enter a note that tells where the link goes. This is the text that appears when visitors place the cursor over the link.
  5. Click Save.

Your custom menu is now active and available from the Menus page. A block is added to the Disabled list on the Blocks page that displays links for all items that you add to this menu.

Follow the above procedures to add links to your custom menu and to place its block on your site.

Configuring hierarchical navigation

In addition to the menu, or primary links, you can also make your navigation hierarchical, so that there are subordinate levels of links under your primary links.

For instance, say you would like to organize a series of related pages under one general page’s link on the menu. After you have created the pages, you can add menu items that are subordinate to the primary link. The result is that visitors are given a smaller menu where most of the links they need can be found right at the top, but they can also navigate directly to more specialized pages by using lower levels in the hierarchy.

To add a second level of navigation to your primary links, complete the following steps:

  1. In the admin menu, click Site building > Menus.
  2. Click the Primary links link. The Primary links page opens.
  3. Click the Add item tab.
  4. In the Path field, enter the URL for the page you want to link.
  5. In the Menu link title field, enter the title that you would like to appear as the link.
  6. [Optional] In the Description field, enter a note that tells where the link goes. This is the text that appears when visitors place the cursor over the link.
  7. In the Parent item section, use the drop-down to select the primary link you would like this item to appear under.
  8. Click Save

Your primary links are now hierarchical, with the new level appearing under the indicated menu item. The new link appears in the Primary links block.

You can continue to add items to your site’s navigation, going down as far as nine levels of hierarchy.

Creating page specific menus

Links do not have to be all grouped in order under one menu. If your site features a complex arrangement of links, you can enhance its usability by breaking the menus up and setting them on specific groupings of pages.

For instance, you can require visitors to go from the Home page to a Writings page, before they can reach your Blog page. The main menu would give all the primary links, but you can also provide secondary menus to assist visitors in navigating the lower levels of your site. These secondary menu would only appear in the parts of your site where they are relevant.

After you create new menus, populate them with menu items, and place them on your site, you can configure the menu block’s visibility settings, so that you control the pages on which the blocks appear.

To configure the menu block’s visibility, complete the following steps:

  1. In the admin menu, click Site building > Blocks.
  2. Find the menu block you want to modify, and then click the configure link. The block’s configuration page opens.
  3. In the Show block on specific pages section, select the Show on every page except the listed pages option, or the Show on only the listed pages option.
  4. In the Pages section, enter those pages that you want to use the visibility settings on.
  5. Click Save block.
  6. Click Save blocks.

Your menu block now appears only on the pages that you want.

Creating a blog roll of external links

To create a blog roll of external links, complete the following steps:

  1. In the admin menu, click Site building > Menus.
  2. Click the Add menu tab.
  3. Enter text for the Menu name and Title fields.
  4. Click Save. The Menus page reopens.
  5. Click the link to your new menu.
  6. Click the Add item tab.
  7. In the Path field, enter the URL that you want for your blog roll.
  8. In the Menu link title, enter the name you want to appear on your blog roll.
  9. In the Parent item section, use the drop-down to select your new menu.
  10. Click Save.

Your site now features a blog roll of external links, links are added as their content appears at the designated URL. The block for the blog roll is now available on the Blocks page and is ready to be placed on your site.

AttachmentSize
Menus_samples_11-3-2011.pdf156.1 KB

Comments

StevenD’s picture

Hi,

I agree with your comment in the first paragraph about the confusion in the documentation; as for your tutorial, it does not explain how to actually get the target page displayed, so we get a menu but no explanations on how to link it to the target page, which is the most basic goal one would have to use a menu system.

Surprisingly I accidently got one page linked in the menu before I found your doc, but I need to figure out how this accident occured.

The documentation is a major issue with Drupal, so one needs to basically learn almost everything by trial and error, a very steep learning curve.

Ok, here is a faster way: you simply create the pages for your menu and while doing it you specify the menu item which is the first option you get on the page creation form, that's it!

One side note, the expander menu does not seem to work, in other word nothing show up with the settings described here.

Steven

mercurythread’s picture

Jesus Wept! I've been going bald trying to get this working - new to Drupal (coming in from WordPress). Cheers for the straightforward approach as I'd been seeing loads of complicated recoding versions etc and had no idea how I was going to get my client to understand how to use the CMS. Cheers. Pint owed if you're ever in Scotland.

argosy1’s picture

In Drupal 6, the navigation to access the Primary Links is Administer > Site Building > Menus > Primary Links.

To access the services provided through Administer > Site Building > Menus > Menu, you'll need to download the Menu_Block - AND - enable the Menu module.

This tutorial is definitely needed and I think it should be better promoted through the "getting-started_2.pdf" document for example. It has taken me some time to find this and I'm hoping it explains how to setup a hierarchical navigation model for a traditional website using Drupal.

In response to "missing major link", I also had to ferret out the details on how to link Content Pages to the newly created Menus. Here is what I discovered:
- Menus will not display unless they have content associated with them. A path of "node/add" will prevent the menu from displaying. A node address of "http://www.example.com" or "node/11" or some other NID needs to be assigned to the path.
- There isn't an easy way to get the NID for a Content Page. I remembered that the Themer module (an add-in) can display the array of properties associated with a given region in the browser. I had to go to Home » Administer » Content management » Content to access my previously loaded Page content, turn on Themer Info, select the region of Page content and then read the NID from the Themer Info array. There has to be an easier way to get NIDs.

David Henry’s picture

Coming from a Joomla background I'm finding Drupal a very steep learning curve indeed, what I'd like to know is how do you know what node to link to?

For example, I've installed Jobtrack which is fine however I've no idea how to create a menu link to it.

Any additions to this?

JB

dzrobarge’s picture

did you ever find the answer?

ccdechesney’s picture

This may or may not help, but I just (while reading the tutorial and comments) solved a similar problem:

I had enabled the Forum core module and wanted a "Forums" menu item in Primary Navigation. Drupal v 6. I went to Administer>Site Building>Menus>Primary Links and added an item. For Path I first tried forum/add and had a menu show up, but could not find that page. So I tried just forum for the path and bingo! I have a top level menu item that goes to a list of forums!

Oh! I just figured out that what you put in the path is the machine-readable name of the content type! Go to Administer>Content Management>Content types and select the content type and edit it. What you see under Type: is what to enter in the menu path if what you're looking for is an overview of a content type.

sp_key’s picture

In my setup menu items that have no content attached do not appear on the menu area. (And please no word about permissions! :))

Best way - I think - is create the menu item while creating content.

Motorcycle Boy’s picture

In the block specific settings you can enter the pages on which you want or want not see the block. But it is a pity that you cannot open a drop down menu (or another selection method) to choose the pages (or other things) that you want to include/exclude. It should facilitate this filtering proces if it was present. Now I have to go back and forth to check the path of my pages.

(idem dito when you want to add an item to a menu....)

burtsbees’s picture

I am creating a bilingual site, so I creating a navigation menu for my second language. On my site, my users have individual profiles. I used the advanced profile kit module to make the profiles. Anyway, while trying to replicate all the paths for my new navigation menu I ran into a problem with the profile path. It shows up as an active link because it is set to link to each individuals profile. Do you know how I can replicate this for my new navigation menu?

subramanibm’s picture

hi,
Please help me how to edit the home page in drupal framework and how do i add a marquee tag ?

subramanibm’s picture

hi,
Please help me how to edit the home page in drupal framework and how do i add a marquee tag ?

moreonion’s picture

Hi everyone!

Since I spent a few DAYS trying to figure our how this stuff works I though I share it with you - if you set up a menu you can add "node/..." to link to a specific node or "taxonomy/.." to add to a category
But my problem was - how do I find out the numbers to replace the dots with...

Since I set up the domain aliases to only show the words, not numbers or "node/..." I couldn't just copy-paste them from the browser bar
But I found them under "building ---> url aliases" listed nicely....

As a drupal newbee this just made me happy for the rest of the day ;-)

John_Buehrer’s picture

Hi,

I second the motion about confusing documentation. But this explanation - while good - shares a common problem: you are trying to describe it all with _excessive narration_, hoping it communicates your mental model to the rest of us.

A picture is worth a thousand words, and much faster to process. How about a few pictures or diagrams upfront and scattered throughout, to show what you are trying to accomplish?

I don't mean to be critical, but technical writing is a solved problem.

Thanks...

TheTortoise’s picture

Nice narration, but you really do need to include some screen shots for those of us less familiar with the lingo.

jamesjames83’s picture

Yes this tutorial lacks a good explanation on how to link to the content for some people and display which node to use for the content, so I think I have a way to help.
Simply do this.

Go to admin/content management/content
- Hover your mouse over the link you want, then
- Choose the content you want to find the node for, and Look at the status bar in your browser, and it should look like this "yourname.com/node/1". For this example, 1 would be the node to you want.

A way to make this easier is to open a new browser window, have one on the content management/content page, and the other on the "primary links" edit page, which is in admin/site building/menus/primary links/ edit.
Just put node/1 or node/x for whatever page you want.
hope this helps
James

inti2010’s picture

I want to combine a WordPress blog and a web site to Drupal.
As a newbie am I wasting my time by doing this on 6.20?

brianbaileyj’s picture

I guess there is a tool to combine wordpress blog to drupal..

mguillau’s picture

I understand that it is possible to create several menus. You can place them, in function of the pages, in the header for instance (in Bartik, they appear on the right side of the header, below "My account - Log in/out").

However, I would like to create a multilingual site without using per se additional modules. Therefore, I would like that the primary menu (the one appearing inline as tabs) changes in function of pages.

Any idea of how to make this happen?

nguyentuanxuyen’s picture

With a menu menu it is very difficult for new people to navigate it to create a main menu and drop down menu I followed and the results were great. Keep it up.
cát thạch anh
chia sẻ