function special_menu_items_menu in Special menu items 6
Same name and namespace in other branches
- 7.2 special_menu_items.module \special_menu_items_menu()
- 7 special_menu_items.module \special_menu_items_menu()
Implementation of hook_menu()
File
- ./
special_menu_items.module, line 18 - 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_menu() {
$items = array();
//Add nolink and separator as a dummy pages.
$noLink = 'nolink';
$separator = 'separator';
$items[$noLink] = array(
'page callback' => 'special_menu_items_dummy',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
$items[$separator] = array(
'page callback' => 'special_menu_items_dummy',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
$items['admin/settings/special_menu_items'] = array(
'title' => 'Special Menu Items',
'description' => 'Configure Special Menu Items.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'special_menu_items_admin_settings_form',
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}