Drupal: menu items without links

Created by janroe

http://drupal.org/project/nice_menus 6.x-2.1 on drupal 6.25
http://drupal.org/project/special_menu_items 6.x-1.6 on drupal 6.25
http://drupal.org/project/menu_item_container 6.x-1.2 on drupal 6.25

Main need: Make it so that certain menu items do not link to content, but have child menu items that are linked to content.

Example: a primary menu item at the top of an expanded menu tree should actually not link. People might not expect a content link there, and if it contains a link users can miss it and miss important content. All links should exclusively be inside the expanding menu tree.

Module assessment: Nice menus is said to handle this, but I can't find it in the project description. It also appears to be an extensive module, not sure how it behaves with acquia prosper theme. I have no problem with css, but i also do not see the need for css mucking for this.

Special menu items addresses this specifically, it has a wide usage in terms of sites, but the project description states that it does not work with i18n internationalisation. That disqualifies it for me.

Menu items container addresses this specifically, it has a low popularity, but from what I read, it should work. I'll need to try it.

  • Upload, extract and enable the module in Site Building > Modules > Other
  • No need to set permissions
  • Site building > Menus > Settings > Primary menu or any other menu, see new tab "Add container"
  • Creating a new container is responsive to multilanguage (i18n), its possible to set the container to specific language or all languages
  • However, the container does not follow menu styling. It needs to be styled separately with menu style.
  • As per instruction attempting styling with "theme_menu_item_container"
  • But this may differ somewhat by theme, constant is probably "menu_item_container" with or without a pre/suffix, in the stylesheet itself the underscores must be replaced with hyphens as in "menu-item-container".

So, the Menu Item Container module works well with multilanguage, i18n. This is really great!

The container is not formatted. This does require mucking around with the css. In retrospect, this simply can't be done without css work, because per definition the no-link menu content is not a pre-styled link any more.

This is what I added to Acquia Prosper local.css for my previously customised primary menu:

Yes, for this particular site I actually use colour names. You'll need to change some of the values for fit your theme.

This works, and with multilanguage!!! Super. Thanks to the author for this easy to use and effective module!

Off topic, after spending a lot of time getting the hover and active trail right for the container (because I'm not a professional css'er), I find out that the contact /tcontact page cannot show an active trail in the primary menu for all languages that have the language prefix. I suspect the language prefix breaks the active trail. A quick thinking work-around to specifying the contact page path with the language prefix like nl/contact is disallowed (error warning). I'll let it go for now, while I appreciate any tip.

But if I move the contact page into a menu list below a container, it will actually show the active trail again: the main menu item is highlighted again. So that's my permanent workaround.