function special_menu_items_init in Special menu items 6
Same name and namespace in other branches
- 7 special_menu_items.module \special_menu_items_init()
Implementation of hook_init().
File
- ./
special_menu_items.module, line 204 - Module to enable placeholder or separator menu items.Placeholder is a menu item which is actually not a link. Something like this is useful with drop down menus where we want to have a parent link which is actually not linking to a page but which is…
Code
function special_menu_items_init() {
//Make breadcrumb of nolink menu item nonlinkable.
$breadcrumb = drupal_get_breadcrumb();
foreach ($breadcrumb as $key => $crumb) {
if (strlen(strstr($crumb, 'nolink')) > 0) {
$crumb = strip_tags($crumb);
$tag = variable_get('special_menu_items_nolink_tag', '<span>');
$breadcrumb[$key] = render_menu_item($tag, $crumb);
}
}
drupal_set_breadcrumb($breadcrumb);
}