/ Published in: PHP
This snippet allows admins to create menu items which do not link anywhere. This is most useful in situations where one wants to have dropdown menus where the parent item should not be a link.
This same method could be used to create non-linking menu divider/headings.
Use http://fake.link for every menu item that should not be linkable.
Also, consider using http://drupal.org/project/special_menu_items to provide this capability.
This same method could be used to create non-linking menu divider/headings.
Use http://fake.link for every menu item that should not be linkable.
Also, consider using http://drupal.org/project/special_menu_items to provide this capability.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function THEMENAME_menu_item_link($link) { } return '<a href="javascript:void(0)" onclick="return false" class="nolink">'. $link['title'] .'</a>'; } else { return l($link['title'], $link['href'], $link['localized_options']); } } ?>
URL: http://drupal.org/node/143322#comment-1354474