1

I want the parent link in the menu to not be clickable. As a path is mandatory, I have created a blank node, and in my module I substitute the link by a "#" char.

I used custom code in module because I have a multidomain/multilanguage site, and a mixture of Drupal and database own tables content for the links. Many solutions for custom menus could not be used as they were not compatible with Domain Access or there was some problem in customizing.

The code I use is:

$a = menu_tree_output( menu_tree_page_data("main-menu") );
if(in_array($value["#href"], array("node/123", "node/456"))) $nolink = true;

I wonder if there is a workaround to this problem, as the typical behavior for a parent menu is to be non-clickable, not to load another page, which would be, IMHO, less typical.

4

You can take look at Special menu items.

User can create a new menu item and place either "nolink" or "separator" to the Path field, without quotes. Nolink item will be rendered similar to a normal menu link item but there will be no link just the title.

Here is another module you can check: Content Menu

You can create a new menu item as

  • URL – With the traditional menu item form
  • Dummy – As a dummy menu item (with simple dummy link target)
  • New NODETYPE – directly create a new content for the new item

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.