Configuring menus, navigation and blogroll for newbies

Last modified: January 20, 2009 - 12:19

A Four Part Tutorial on How to Set up A Basic Navigation, A Hierarchical Navigation, Separate Blocks for Your Navigation and A Blogroll using Drupal 6.1 (Garland Theme)

I wanted to set up a basic, hierarchy site nav for my site, but I found all the posts and documentation that I read so confusing and (forgive me pls.) over-geeked that I was ready to give up. Surely it couldn't be this difficult for the most basic function of a site. And it's not. In truth, once I 'saw' the answer, I was appalled at how easy it was, and how close I had come to throwing the whole thing out.

This is how it is done, as close to step by step as I can make it. I will say this before you begin. Go through the steps. You will learn as you go, and once you start to see your results, you will begin to catch on how to go about the rest, or how to change it, or how to make it do EXACTLY what you want. But go through the basics, till you understand it first.

Also, remember that you MUST CREATE ACTUAL CONTENT for most of your links to begin to show up on your pages. However, the structure will be there for when you do.

SETTING UP THE BASIC, FIRST LEVEL NAVIGATION.

Go to Admin > Menus
Select Primary Links

Primary links are the links that will show up in both the blue banner bar of the Garland theme, and as in an item called (Primary Links) in Administer > Site Building > Blocks, which you can move to any location you like. If you do not wish to add any links in the Blue Bar, then simply go back Administer > Site Building > Menus, and select Add Menu for your links.

This tutorial assumes however, that you want at least a few links to show up here, i.e. Home, or About Us, or Contact.

To return to the steps. On the Primary Links page:

Select Add Item.

You will get a page that asks you for Path, Menu Link Title, etc. For Path: type in node/add. For Menu Link Title, type in the name that you want to show as the Link. i.e. Home, or About Us or whatever link you want.

*NOTE concerning the Path URL:
This I just realized ~ When you type in node/add as the Path URL, all the links that you create under Primary Links that show up in the Blue Banner bar of the Garland Theme will show up to your users (including you as the Admin) as links to 'create content' according to the content that they are permitted to create. This condition is only for the links that show up in the Blue Banner Bar. It does not pertain to the links that will show up in your sidebar under the Primary Links Block. If you do not want this (the create content link), then you will have to change the Path URL to node/(node number) according to the instructions further on in this tutorial on how to find the node number. You can also change this Path URL at any time through the edit function once you begin to create content, and so change the target of your links then.

You can add a description that will show up on a mousehover if you want by filling in the description box. You can also fill this in later if you want, as you refine your menu's and links by using the edit functions.

Going down the page ~

Toggle Enabled. This will make your link show up. Ignore Expanded for the time being. This used if you want your Navigation to remain in the expanded state (toggle ON) or closed, and expanded only when clicked (toggle OFF).

Parent Item: Select Primary Links. This will set the links to show up in the Primary Links Block, as well as in the Blue Banner of the Garland Theme.

Save.

Keep adding Items in the Primary Links Menu until you have the links that you want for your Primary or First Level Navigation. You should see these same links showing up in the Blue Banner of the Garland Theme as you save them.

Now: Go to BLOCKS.

Locate the Block that says Primary Links, and move it to your preferred location. This menu list will show up where you place it, and it will be a duplicate of the one that also shows up in the Blue Banner of the Garland Theme. If you do not want a duplicate, you can skip this step. Likewise, if you want to break up your Primary Nav into separate blocks, you can skip this step and follow the tuturial for this procedure further on down the page.

SETTING UP SECOND LEVEL NAVIGATION:

Go to Admin > Menus > Primary Links.

Select Add Item

Fill in Path (use node/add) and the Menu Link Title should be what you want the name of the actual link to be. Enter the description as you choose, toggle Enabled, and now you come to :

Select Parent Item. Scroll through the list, and find the Menu that you want this link to be set under. Choose that and you now have your second level hierarchy.

For example: You set up a Primary Link called About Us. Now you want to set up subsections under About Us. Toggle About Us, and your new subsection that you just created will show up here. If however, all you want to do is just list separate pages under About Us, you can do this through the page creation process and you do not need to set up a second level navigation.

You can continue doing this for each subsequent level to a depth of nine levels of hierarchy. Each Item you add under node/add as the Page url, you are essentially creating a 'folder'.

BREAKING UP YOUR NAVIGATION INTO SEPARATE BLOCKS

Not everyone wants their navigation to be one long list down the side, on all pages. Some would like to break up this navigatin and distribute it on the page, especially if they have a two column theme, as Garland does. There are a number of posts in the forums asking how to break this up and have only certain blocks appearing on certain pages. This portion of the tuturial will tell you how to break up your basic navigation to do this very thing.

Go to Admin > Menus > Add Menu

Select Add Menu.

You will see a page that has Menu Name, Title Name, a place for a short description, and a Save button.

The Menu name will be an internal ID name, all lower case letters with no spaces. Title Name will be the Title of the Menu. This title will also show up as a Block on the BLOCK section of your Admin. It will be the title of the Block of Nav you want to show up on your pages.

Add your description if you want. This description is for your benefit, and will show up on your Menus Page. SAVE.

You should now be back on the main Menus page, and your new Menu should be listed there with your description, if any, underneath it.

Select your Menu that you created. You should now be at a page that has the name of your Menu at the Top.

Select Add Item.

Go through the same proceedure that was listed at the beginning of this tutorial, the way you did to create your primary links, and list all the particular Link Titles that you want to show up in this block. SAVE.

Go to BLOCKS.

Locate your Blocks that you just created, toggle them to go to whichever location you want them to go on your pages. SAVE BLOCKS. These blocks will now show up on all your pages according to the locations that you have selected.

Want to have only certain blocks show up on certain pages?

Go to the block that you just activated on the BLOCKS page, and Select Configure.

You will now see a page that asks you for:

Block Title: This will be the title that you gave the block in the Menu. If you want to override this and use a different name, you can do so here. If you do not want the name to show at all, you can enter . Overriding the name does not change the name, it merely overrides it for the purposes of the block.

Select your configuration settings to suit your need.

Now you will reach the portion that says: SHOW block on specific pages.

This is where you can toggle to eliminate pages, or you can toggle to select certain pages for this particular block to go on. If you want a Blogroll to go only on blog pages (next section will tell you how to do that), then enter into the space, blog/*. The * is the wildcard that will select all blog pages.

If you only want the block to show up on specific pages, this is where you add that page. To do this, call up the actual page you want the block to show up on and look at the address bar. It will give you an address that will end in node/___ with ___ being a number. Enter this number into the SHOW block space on your block configuration page as simply node/35 or whatever your node number was. You will now have this specific block show up on only that particular page.

If you chose page/* then your block will only show up on content created as pages. Likewise with books, forums etc. If you only want it to show up on certain pages, then you will have to find their node numbers and add these in.

SAVE your configurations, and that is it.

NOW, you will have to start creating content if you want any of your blocks to start showing up. Once they start showing up, you will begin to 'see' how it works, and can alter or adjust your navigatin to suit your taste.

As a word of advice, DO NOT USE the 'NAVIGATION' Menu to set up your links. This is the default navigation for all your site permissions according to user. You can toggle this block to be where you want it to be through the BLOCKS menu, or you can have it not show up at all, by untoggling it.

Any of the Menu items that you want to move around, you can do so through using the drag and drop handles on Drupal 6.1 or through using the 'weight' function on Drupal 5.7.

If you try to use the Secondary Links, what you will end up with is by having your secondary links show up on the Blue Banner of the Garland theme. They do not necessarily show up under the primary link, and they are not drop downs either. As such Secondary Links is not a menu that will accomplish your purpose in setting up a basic nav with a hierarchy. What else you would use it for, I do not know. Using Primary LInks has resolved the Nav and Link issue admirably.

HOW TO CREATE A BLOGROLL OF EXTERNAL LINKS. (again, using the Garland Theme)

Go to Admin > Menus > Add Menu

Your Menu Name is an internal ID that should be all lowercase with no spaces.

Title Name is the title that you want to call your blogroll.

Enter a brief description if you want, and SAVE. You will be taken back to the Main Menu's list. The name of the menu that you just created should show up here.

Select your new Menu.

Select Add Item.

You will now see a page that asks for Path, and a Menu LInk Title etc.

In the Path area, enter the full URL that you want for your blogroll link.

In the Menu Link Title, enter the name you want to appear on your blogroll.
i.e. Path could be #http://www.abcdefg.com# (the #'s are so it won't show up as a link, I hope) but the Menu Link Title could be 'Tiny Tots', which when selected will take you to abcdefg.com

Add a description of the site link. A brief word of what you are linking to.

Toggle Enable

Ignore Expanded, unless you want to repeat the steps of a hierarchy (maybe someone has multiple sites)

Parent Item: Select to the name you gave your new Menu or blogroll. If you ARE creating a Blogroll hierarchy, repeat all the same steps for creating a Nav hierarchy and set it to the parent item that you want it to show up under.

Weight can be set optionally, or you can use the drag and drop handles on the Menu page to set the order of your links.

SAVE.

AND THAT IS IT! No coding, no extra modules or plugins, all basic and straightforward.

As you begin to see it in action, and you begin to add content, you can play around with it, and tweak it to your hearts content (i.e. adding CSS and the like).

Missing major link

StevenD - October 19, 2008 - 15:52

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

Cheers For the Post

mercurythread - June 15, 2009 - 21:28

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.

Drupal 6 mods

argosy1 - November 26, 2008 - 16:10

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.

Linking to a Module

David Henry - April 22, 2009 - 21:36

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

waaaaaah

good question...

dzrobarge - May 29, 2009 - 18:01

did you ever find the answer?

I just solved a similar problem

ccdechesney - November 3, 2009 - 20:47

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.

In my setup menu items that

sp_key - October 13, 2009 - 15:58

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.

No dropdown menu in Pages Filter (block specific settings)

Motorcycle Boy - November 18, 2009 - 09:46

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....)

 
 

Drupal is a registered trademark of Dries Buytaert.