function nodeorder_menu in Node Order 6
Same name and namespace in other branches
- 5 nodeorder.module \nodeorder_menu()
- 7 nodeorder.module \nodeorder_menu()
Implementation of hook_menu().
File
- ./
nodeorder.module, line 223 - Nodeorder module.
Code
function nodeorder_menu() {
$items = array();
$items['admin/settings/nodeorder'] = array(
'title' => t('Nodeorder'),
'description' => t('Allows the ordering of nodes within taxonomy terms.'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'nodeorder_admin',
),
'access arguments' => array(
'administer nodeorder',
),
'type' => MENU_NORMAL_ITEM,
);
$items['nodeorder/term/%'] = array(
'title' => t('Nodeorder term'),
'page callback' => 'nodeorder_term_page',
// I want to call taxonomy_term_page but can't change the sort order...
'page arguments' => array(
2,
),
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
$items['nodeorder/order/%'] = array(
'title' => t('Order nodes'),
'page callback' => 'nodeorder_admin_display',
'page arguments' => array(
2,
),
'access arguments' => array(
'order nodes within categories',
),
'file' => 'nodeorder.admin.inc',
'type' => MENU_CALLBACK,
);
$items['taxonomy/term/%/view'] = array(
'title' => t('View'),
'page callback' => 'taxonomy_term_page',
'page arguments' => array(
2,
),
'access arguments' => array(
'access content',
),
'weight' => -10,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['taxonomy/term/%/order'] = array(
'title' => t('Order nodes'),
'page callback' => 'nodeorder_admin_display',
'page arguments' => array(
2,
),
'access callback' => 'nodeorder_order_access',
'access arguments' => array(
2,
),
'file' => 'nodeorder.admin.inc',
'weight' => 1,
'type' => MENU_LOCAL_TASK,
);
$items['nodeorder/term/%/view'] = array(
'title' => t('View'),
'page callback' => 'nodeorder_term_page',
'page arguments' => array(
2,
),
'access arguments' => array(
'access content',
),
'weight' => -10,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['nodeorder/term/%/order'] = array(
'title' => t('Order nodes'),
'page callback' => 'nodeorder_admin_display',
'page arguments' => array(
2,
),
'access callback' => 'nodeorder_order_access',
'access arguments' => array(
2,
),
'file' => 'nodeorder.admin.inc',
'weight' => 1,
'type' => MENU_LOCAL_TASK,
);
$items['nodeorder/moveup/%/%'] = array(
'title' => t('Move Up'),
'page callback' => 'nodeorder_move_in_category',
'page arguments' => array(
1,
2,
3,
),
'access arguments' => array(
'order nodes within categories',
),
'type' => MENU_CALLBACK,
);
$items['nodeorder/movedown/%/%'] = array(
'title' => t('Move Down'),
'page callback' => 'nodeorder_move_in_category',
'page arguments' => array(
1,
2,
3,
),
'access arguments' => array(
'order nodes within categories',
),
'type' => MENU_CALLBACK,
);
$items['admin/content/taxonomy/%/order'] = array(
'title' => t('Order nodes'),
'page callback' => 'nodeorder_overview_terms',
'page arguments' => array(
3,
),
'access callback' => 'nodeorder_taxonomy_order_access',
'access arguments' => array(
3,
),
'weight' => 5,
'type' => MENU_LOCAL_TASK,
);
return $items;
}