Drupal menu tips: special menu items, lost items and menu edit

Special menu items

Sometimes, you need to create special menu items that are not supposed to be links - main menu categories as an example:

About us
Services
- Drupal security
- Drupal development
- Linux development
References

"Services" needs to be a standard menu item and usually, you are allowed to click on it. That requires that you create some kind of content on the page, which might be undesirable.

As you might suspect, "There is a module for it" (tm). Special menu items allows you to create placeholder and separator menu items, without a link and with custom HTML. In case of a separator, you can use <hr> instead of a text to separate categories. Just create a new menu item and point it to "nolink" or "separator" address...

Special menu items will take care of breadcrumbs and works with Sitemap module too.

Selecting menus at node add page

Some users might get confused by the fact that if they have enough permissions, Drupal will offer them to choose between several menus in Node add page.

Module Menu Settings per Content Type solves that by allowing you to configure permissions for separate content types. Just install the module and go to: Administer > Content management > Content types > TheContentType edit

Menu lost items

Drupal 6 has a bug related to using parametric views with menu items - when you create some menu item with an argument and then change the argument, the old menu item will stay in database but won't be visible in administration. That causes problems because Drupal might use the old items sometimes.

There is a solution in following comment.

Of course, don't forget to make a backup copy when you do anything with your database.

Marek Janouch

Marek is a senior Drupal and PHP developer for Dynamite Heads.