Working with Menus
Introduction
This will not be an exhaustive piece on the subject of menus. The main point is 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.
Many "experts" claim that 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. Many new Drupallers have trouble understanding it all. Just keep at it.
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 collect and order content data. So menus are used to arrive at content and categories to order it. It is important to see these as two separate things.
A menu entry allows you to point directly to a node, like a page or a story, but you can also point to a term in a vocabulary, which would show you a summary list of stories or pages.
Creating a new menu

Start by going to the navigation menu and follow the links: Administer - Site building - Menu

You'll end up at the Menus page

Next you will add a whole new menu

There are three areas to add information to: menu name, title, and description

- Menu name
- The menu name has to be machine readable, which means that is can't have spaces, punctuation, and has to be lower case. This exosts so that dupal has an internal reference. As of Drupal 6: This text will be used for constructing the URL of the menu overview page for this menu. This name must contain only lowercase letters, numbers, and hyphens, and must be unique.
- Title
- The title is what you and other site users see and it can be anything you want
- Description
- Writing a description for your menu entry can be very useful to retain information about why the menu entry was created.
Once you have entered your information save your information.
Adding a menu entry to your newly created menu
The navigation menu will now show a new menu entry and the Foo Bar menu is created so that menu entried can be added.


After clicking the Add entry link we get an Add entry edit form

- Path
- The path is where the menu entry will point to. This can be external, as it is in this case http://drupal.org, or internal such as node/1 or admin/reports.
- Menu link title
- Give your menu entry a title. In this example, Drupal
- Description
- A description can be useful to tell yourself and others what the menu entry is for
- Enabled
- This checkbox allows you to make the menu entry active or inactive without having to delete it.
- Expanded
- If this menu entry has sub-entries, known as children, this allow the menu entry to stay expanded so that the children are shown by default.
- Parent item
- Parent item selection allows you to choose where in the menu hierarchy your menu entry belongs.
- Weight
- Weight defines the reative rank of your menu entry. A smaller number means it is higher up.
Now save your menu entry.
Display your new menu
To display your new menu you will add a display to your Drupal installation called a Block. You can learn how to add blocks by reading Blocks - Adding extra information.
Activate the Foo Bar block in the left sidebar. When you are done, you should see:

You left sidebar should now display Foo Bar followed by the link you specified

You should now be able to create and edit menus.

using node/add
It would be so helpful to add a few words on what the path should be in a primary link menu should be. It would have saved me 3 days of frustration.
I would say something like this:
if you assign the path: node/add. as suggested on the page, your links will not be visible to users who are not logged in to the website.
But you cannot add a word as the node name, it has to be a number.
I hope this is all correct, I am just feeling my way through this whole new experience!
Thank you
Nan
Confused
These instructions are confusing me. I don't see any textual menu, tabbed menu, or books menu in my drupal. All I see are navigation, primary links, secondary links as my options for menus? I'm using drupal 6.
Okay
"textual menu, tabbed menu, or books menu" are styles, not content. The vanilla Navigation menu is a "textual menu." The Admin>>Taxonomy page, for example, provides a basic "tabbed menu;" to see more advanced examples, you need advanced themes. The Book module does it's own thing, but is very similar to the textual menu, but as a dynamic block.
NancyDru
Not very user friendly
I would concur with the 1st comment made on this ... It has taken me well over 3 days trying to play around this. At one point I was even tempted to post something on eLance to get someone else to do this for me :). That being said here are a few of my own personal "aha" moments that may help others dealing with this:
The above tutorial does a great job explaining HOW to create the menu but the hardest part of the whole process is the "path" setting. This is a required step which is frustrating since I was hoping to create the menus BEFORE creating the content!
Anytime you create a new page/story it is assigned a node/# ... generally in the order you create the content. It would be fantastic if rather than being a number or having to already have the content created you could just type in the name of the page but alas it is what it is.
So ... if you are struggling with the path you will 1st need to create a page! Generally this will be called node/1.
Hopefully that makes a little more sense. Based on this information your priority may want to be creating CONTENT before playing with Navigation!
Thanks
I will write myself a todo note to work on this.
Note that "Creating content" does come before menus in the Cookbook.
NancyDru
Imperfection
This work was done as part of the Twin Cities Documentation Sprint on June 20, 2009.
The first comment on this page refers to the documentation before June, 20, 2009. I was hoping to improve the documentation and I apologise for not making the path-setting question clearer in this revision.
On further consideration, I am willing to say that your issue and the issue that the writer of the first comment had are probably different issues. I can't say that with complete confidence since your comment comes right after the new version was made live.
Keeping in mind that the "Creating Content" page comes before this page and helps clarify some of the assumed knowledge in this page, if you have any corrections please note them in a comment, or do as I did, and edit the page.
In any case, you can create menu with bogus paths, or internal paths that go to the same place, if you just want to create a menu structure and then fill it in with content. This will not create nodes automagically.
Add a picture - is that impossible?
Am I the only person who wants a picture on the front page?
Or am I just the only person who didn't have the knowlege of how to do that programmed in at birth?
Are pictures that rare that no one wants to know how to put one up on their home page?
I've wasted 2 days already. So far I'd have been far quicker to write ordinary web pages in pure html and php.
???
Are you talking about the logo (theme setting) or as part of a node? Take a look at the Image Attach module (part of Image) or just the core upload module. And you can always just use a standard IMG tag.
NancyDru
Adding content to menus
I'm a newb so this may seem like a dumb question, but why can't one, when adding new items to a menu, just select the content to be added as with Joomla? It would be easier than knowing all of the node IDs.
It can
When you create the node, you may specify at that time that it is to be added to the menu. You only need to know the node ID when you decide to go back and add the item after the fact. However, I'm sure someone could easily code a simple module to do an auto complete field for selecting the node.
NancyDru
Point to a file
In the "Path" is there a way to point a menu item to a file in sites/default/files? I would like to put a pdf document in there as part of the menu.
Never tried it
I have never tried it and don't anticipate doing so, but off the top of my head, I can't see why it wouldn't work. Back up your database and give it a try.
NancyDru
Isn't there an easier option?
I don't understand the menu system. When I create content, there is a "Menu Settings" section. What is that for?
The complicated part is, I have to take note of my pages's URLs for creating the menu. This generates a lot of errors. I think there has to be an option to create a new page and add to a menu without having to write down the new page node and creating a new entry in a menu with this information.
But I cannot find this information anywhere...
Regards
Alex Angelico
http://www.conexion-seo.com.mx/
It works
Ok, answering my own question, after I created the Menu as described in this document, now I can create content and add to this menu from the "Menu Settings" in the Add Content area.
So, the steps are:
1.-Create a new Menu and assign to a Block
2.-Add content to the menu directly from the "Menu Settings" option in "Add Content" area.
Am i right?
Regards
Alex Angelico
http://www.conexion-seo.com.mx/
Navigation
The "Navigation" menu is standard and you can set your menu entry there.
I don't know when the new menu stuff got added to this page, but, frankly, I think it was a disservice to the primary audience of this book. In over two years with Drupal, and dozens of sites, I've maybe created two new menus.
NancyDru
Twin Cities Documentation Sprint
I don't remember whether the creation of a new menu was there before the Twin Cities Documentation Sprint
When we approached the documentation we adopted the stance that the Drupal user should be able to undertake basic Menu creation tasks by following the steps as we wrote them out. We might not have succeeded completely.
If you are following this cookbook entry and you find a spot that is either confusing or just plain wrong (Bad Samir!) let me know and I'll update it. Otherwise, update it yourself.
Cheers.
Don't worry
I am considering reverting the whole page to its original state. IMHO, this page in particular has gone way beyond the initial intent of the Cookbook.
My stance was, and continues to be, that the Cookbook is to get people going on their first sites and not to be a complete tutorial on Drupal. As I have said before, anyone with more than a year of Drupal experience probably should think twice before touch this book.
NancyDru
Not sure what the critique is
Nancy,
That is your right. If you want to revert the changes we made, go ahead. I would be happier if you have specific critiques of the current documentation. I am not sure how the current documentation is in conflict with The Drupal Cookbook (for Beginners) helps Drupal "newbies" by providing a walkthrough of a common Drupal Setup. This is a great tool for Drupal.org users who are overwhelmed at first.
The documentation, as it existed prior to this was overly personal in tone (Too much "I") and used some examples, that were not likely to be used by the "newbie" audience such as the book module. In fact, even the use of a term like newbie isn't proper.
You have a lot of seniority and I'll defer to your wishes for this but I consider it a regression to revert to the previous material.
Like I said, if you have particular critiques of the material I am happy to see changes made. If the structure is flawed point out the flaws so that they can be fixed.
Okay
My biggest concern is that this page in particular is now overshadowed by a process few will ever do, or need to.
As for the audience, I have had numerous emails thanking me not only for the content, but also for the (personal) style. I fought hard to even get this book posted on DO. It originally was a top level book so that it was easier to find for those who had not yet mastered navigating DO.
Many of your groups changes are positive, but some have been negative as well. I have posted in the Documentation group to little avail. It would be nice if that courtesy had also been afforded me.
NancyDru
Strong feelings
Nancy,
I said it before, and I'll say it again. If you feel so strongly about this, revert the changes. I've backed up the images and the content and will re-purpose it if necessary.
Cheers,
Samir
This page fine, "Display your new menu" may need clarification
As a Drupal newbie who's followed lots of instructions (have Drupal 6 from CVS and ubercart + all required modules installed) but hasn't yet generated any content, these pages are very helpful, if ever so slightly minimal in places. Usually I have to re-read to find out where I'm supposed to navigate so that I can continue with the topic under discussion.
At the moment, the "Display your new menu" section refers the reader to documentation on blocks, but doesn't explicitly say "Go to Administer\Site building\Blocks and scroll down to the following section... Activate the Foo Bar block in the left sidebar etc. etc."
Other than that I'm now at the point of having a new story and new page (and new ubercart product), so am looking forward to reading on. Hoping the topic of customising a theme so that ultimately I can mimic an existing site's look (and feel) in order to migrate to drupal is not going to be beyond the scope of this tutorial.
In general, I don't expect the whole thing spoon-fed, but telling me what's available and walking me through the basics so I can research topics effectively would be the most useful thing to me and many other newbies like me I suspect.
Second the need for clarification
I was just going to write up this same comment. I am brand new and it took some mental energy to figure out the context switch to the Blocks and the need to go to the Blocks section. Adding the sentence suggested by MarkE should do the trick.
--David
Putting menu on listed page only
Hi,
I created a new menu and added items to it. Then i went to blocks and configured the menu such that it appears only on a particluar page. I have created that page and gave the node path for that page in the space given. However the menu refuses to show on that particular page. If I select the option of show menu on all pages then it shows. Could anyone tell me why this is happening?
Thanks,
Niketa
Niketa
Adding Menu to Block?
I'm a newb and have managed to create my first site, create some content, create a menu and a menu entry. However, I don't understand the following instruction:
"Activate the Foo Bar block in the left sidebar."
I read the "Blocks - Adding extra information" page that was referenced, but when I go to Administer > Site Building > Blocks I don't know how refer to my newly-created Menu. I'm assuming I need to put something in the Block Body, but I have no idea what.
Thanks for any help you can provide.
Nevermind - I figured it out
Just putting the name of the Menu in the Block worked. Should have tried a few things before posting. :-)