Drupal Menus

We’ve already encountered the Drupal menu system a couple of times so far in this documentation. Let’s take a look in more detail and pick up a few tips on the way.

Drupal’s menus each consist of a hierarchy of links to various pages on the site. There can be any number of menus in a Drupal site and you have already seen the main menu and user menu running on your template site. Menu’s can be rendered onto the page as a pretty simple HTML list by Drupal, or you can write code or (more likey) install a module which outputs the menu in any way you see fit. Our site already has one such module installed, Superfish, which converts our simple menu hierarchies into nice drop down menus which remain accessible and work well across devices. It’s the Superfish module which lets the menu drop down when you hover on the About this record centre menu item, for example. We also use another module, Special menu items, to allow menu items which don’t actually link to a page such as the menu headers over each sub-menu.

To review the menus available on your site, click the Structure link in the admin toolbar then click the Menus link. This takes you to a page listing the available menus:

../_images/drupal-menus-list.png

There are a few menus here, some created by the Drupal core, some by modules added to our site. We’re only using the Main menu and User menu on our site at the moment. Click the list links link by the Main menu to view the links for our menu. This page shows the complete layout of our menu and provides handy drag-handles so that you can re-order menu items and even move them between different menus.

../_images/drupal-menus-list.png

Have a practice moving menu items around and remember to click the Save configuration button if you want to save your changes.