Adding links to menu, and improved menu implementations

Date: Wed Dec 31 2008 Drupal
The Drupal menu system allows for multiple 'menu' structures. Out of the box it comes with a 'Navigation' menu that includes the 'create content' and other interesting choices. It may be enough for you to leave that menu in its default form. Additionally Drupal has a 'Primary Links' and 'Secondary Links' menus which can be populated with links. Drupal also allows site administrator to create more menus, and menus are available as Blocks allowing the menu to be placed on the page. Because menus are implemented as blocks this gives several flexible ways to control when and where the menus appear.

A nice feature of Drupal menus is that the menu appears on pretty much every page of the site. This is a core part of making a Drupal site navigatable, in that anything appearing in a menu is immediately reachable from every page of the site.

One can easily add any page to a Drupal menu. The simplest way is while editing (or creating) the node, to open the 'Menu Settings' section of the editing page, and fill in the values. It will add a link in the desired menu to the page. It's also easy to Administer / Site Building / Menus and create menus and add menu entries.

I've found the default contents of the Navigation menu to be a little jumbled. The default contents mix administrivia items like 'My Account' and 'Create Content' with important navigation items. It can help to create a second menu and move some of the items to that menu.

A menu can be structured as a 'tree'. That is, each menu item can have child menu items. Out of the box the 'Create Content' and 'Administer' menu items appear this way. And out of the box in order to view the child menu items you have to click on the parent item, this causes the page to reload with the menu expanded. So to visit subsidiary menu items takes a full browser page refresh.

One can avoid the full browser page refresh by configuring the menu item to be expanded. Go into Administer / Site Building / Menus and edit the menu item, and you'll see a box marked 'Expand'. Check that box and from then on the menu item will be expanded. Doing this makes it quicker to navigate to the child menu items, and I've done this for the 'Create Content' menu item. However it makes the menu take up more space on the screen. Screen space is a premium item, I think.

It's now possible to use dynamic menus implemented with CSS and Javascript to make the menu structure be usable in a more compact space. I've covered the general technique in: Dropdown menus using CSS and/or Javascript. In Drupal there are several modules which implement these methods.

There are several modules which do this, all of which are linked from this page. I've tried three and can recommend two: Simple Menu, Nice Menus. Both are customizable by changing the CSS and both work really nice. With Nice Menus you can create multiple dynamic popup menus whereas Simple Menu only does one menu at the top of the page.

The huge advantage the dynamic menus have is to put, in a very very very compact space, links to lots of pages within the site. You can create a nested menu structure with lots of menu items with minimal required screen real estate. The user simply mouses over the menu, and the menu items pop up giving them direct and quick access to everything you've put into the menu.

The most amazing and nice effect from these dynamic menus is the Create Content and Administration menus.

Taxonomy Menu offers an ability to incorporate your vocabulary into the menu structure. It gives users direct access to the taxonomy summary pages Drupal generates. If placing the taxonomy menu into a dynamic menu makes it very nice to browse the taxonomy pages. However the Taxonomy Menu module implements its own pages for browsing nodes based on taxonomy.