不是链接的Drupal菜单项
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了不是链接的Drupal菜单项相关的知识,希望对你有一定的参考价值。
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.
<?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']); } } ?>
以上是关于不是链接的Drupal菜单项的主要内容,如果未能解决你的问题,请参考以下文章