Working with the Menu

Introduction

This will not be an exhaustive piece on the subject of menus. My main point will be to start you on building your menu and giving you a flavor for how it works. A more complete guide to menus can be found at Creating a menu structure<.

As we all know the menu, or navigation system, can make or break a web site. It must be easy to follow, often referred to as "intuitive." It must be complete, yet compact.

There is a lot of content on the Drupal site on menus. Most newbies have trouble understanding it all. I've been using Drupal for just over a month as I write this and I still have a long way to go on completely understanding menus.

For beginners it can be very confusing to understand the difference between menus and categories. The menu is a navigation system and categories is a system to order content data. So menus is to arrive at content and categories to order it. Initially to understand Drupal well, you have to see these as two separate things.

With a menu you can point directly to a node, like a page or a story, but you can also point to a term in a category, which would show you a summary list of stories or pages.

How To Menu

Drupal offers three primary ways, which may be combined, to provide your users with site navigation.

  1. Textual menu - this is the "standard" line-by-line type of menu, like what you see on most sites, including mine. It can be enhanced in a few ways, such as using a CSS< or separate book navigation (as I have done here).
  2. Tabbed menu - becoming more popular because it's a little more "gee-whiz" in its presentation. It is debatable as to whether it is any more effective for your visitors. In Drupal, it is divided into "Primary" (the tabs you always see) and "Secondary" (the part that drops down, or slides out). Not all themes support secondary links.
  3. Books - Books are organized separately from menus, but have their own navigation, which you can see on this site. See my section Creating a Book Page<.

Textual Menu

The textual navigation is the easiest to understand. As a matter of fact, I still don't understand how to make the "secondary" part of tabbed navigation work the way a lot of people think it should (drop down).

You may see the terms "primary links" and "secondary links" in many posts. This is one area where I find the Drupal documentation confusing (at best). While they sounded great, and I am now using them, they may not be the best thing for someone just starting out. Stick to the standard "Navigation" menu until you have a better feel; you can always go back and change this later.

For the most part, the "standard" menu is best built as you create content, but may require a little tweaking as you see how it lays out.

When you create a page, story, blog, or book page, one of the fields that you may (should) fill in before submitting, is the menu entry (if the node is to have one). You have the "title" (what is to appear in the menu as people see it) and a "description" (what they will see if they hover the cursor over that entry).

I rarely worry about the "weight" until I see how it shows up in the menu. At that point, you can either go back and edit the content you created or go to Administer >> Site building >> Menus< and edit it there.

Okay, that was the easy part. Now let's say you want this particular content listed in the menu as a child of some other page. No problem! Let's say you have a subject's introductory page already listed in the menu, for example "Family History." The page you're creating is "1860-1899." When you build the menu entry, you'll notice a selection box labeled "Parent Item." Scroll down the list until you find "Family History." Now when you submit this page, it will be a child of "Family History," making that item an expandable menu item. You just created a hierarchical menu!

Tabbed Menu

In those themes that support this technique, the "Primary" seems to get built automatically as you build the "Navigation" menu, unless you specify a different menu set. I have no idea yet how to make drop down "secondary" links part work - I think it requires a separate module. I do know how to make the secondary links appear in a block, if they exist. I like the way that works, but it may not be for everyone.

Books

The book "menu" is built automatically for you. The only thing you have to worry about is the order of the entries (hint: weight).

The only "complicated" part is turning on the book navigation block, which is done at Administer >> Site building >> Blocks<. All you really need to do is to tell Drupal which region to place it in and its relative weight. You can get fancy, if you want, with your style sheets.

More

Later you might consider using the taxonomy_menu module<. It will add to your confusion, but it will be good when there are frequent changes in your vocabularies. It will make the difference between menu and categories almost completely disappear, because it allows you to make vocabularies appear as a menu. This way menus will be generated automatically.

If you want hierarchical drop down menus, the nice_menus module< might come in handy.