function menu_position_menu in Menu Position 7.2
Same name and namespace in other branches
- 6 menu_position.module \menu_position_menu()
- 7 menu_position.module \menu_position_menu()
Implements hook_menu().
File
- ./
menu_position.module, line 76 - Provides menu links for dynamic positioning of nodes based on configurable rules.
Code
function menu_position_menu() {
$items['admin/structure/menu-position'] = array(
'title' => 'Menu position rules',
'description' => 'Configure rules for menu positions.',
'access arguments' => array(
'administer menu positions',
),
'page callback' => 'menu_position_rules_form_callback',
'type' => MENU_NORMAL_ITEM,
'file' => 'menu_position.admin.inc',
);
$items['admin/structure/menu-position/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/structure/menu-position/settings'] = array(
'title' => 'Settings',
'description' => 'Configure settings for menu positions.',
'access arguments' => array(
'administer menu positions',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'menu_position_settings_form',
),
'type' => MENU_LOCAL_TASK,
'file' => 'menu_position.admin.inc',
'weight' => 10,
);
$items['admin/structure/menu-position/add'] = array(
'title' => 'Add menu position rule',
'description' => 'Add a new menu position rule.',
'access arguments' => array(
'administer menu positions',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'menu_position_add_rule_form',
),
'type' => MENU_LOCAL_ACTION,
'file' => 'menu_position.admin.inc',
);
$items['admin/structure/menu-position/edit'] = array(
'title' => 'Edit menu position rule',
'description' => 'Edit a menu position rule.',
'access arguments' => array(
'administer menu positions',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'menu_position_edit_rule_form',
),
'type' => MENU_CALLBACK,
'file' => 'menu_position.admin.inc',
);
$items['admin/structure/menu-position/delete'] = array(
'title' => 'Delete menu position rule',
'description' => 'Delete a menu position rule.',
'access arguments' => array(
'administer menu positions',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'menu_position_delete_rule_form',
),
'type' => MENU_CALLBACK,
'file' => 'menu_position.admin.inc',
);
$items['menu-position/%'] = array(
'title' => 'Menu position router',
'description' => 'Sets access to all menu position links.',
'access arguments' => array(
'access content',
),
'page callback' => 'menu_position_router',
'page arguments' => array(
1,
),
'type' => MENU_CALLBACK,
'file' => 'menu_position.admin.inc',
);
if (module_exists('taxonomy')) {
$items['menu-position/taxonomy/autocomplete'] = array(
'title' => 'Autocomplete taxonomy',
'page callback' => 'menu_position_taxonomy_autocomplete',
'page arguments' => array(
3,
4,
),
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
'file' => 'plugins/menu_position.taxonomy.inc',
);
}
return $items;
}