function nodesymlinks_menu in NodeSymlinks 7
Same name and namespace in other branches
- 6 nodesymlinks.module \nodesymlinks_menu()
Implements hook_menu().
File
- ./
nodesymlinks.module, line 25 - Node Symlinks allows creating duplicate menu links with unique id to all nodes. As a result all these duplicates have unique menu trails and breadcrumbs.
Code
function nodesymlinks_menu() {
$items = array();
$items['node/%node/mid/%'] = array(
'title' => 'Content Duplicate',
'title callback' => 'nodesymlinks_menu_title',
'title arguments' => array(
1,
),
'page callback' => 'nodesymlinks_page',
'page arguments' => array(
1,
3,
),
'access callback' => 'node_access',
'access arguments' => array(
'view',
1,
),
'type' => MENU_CALLBACK,
);
$items['node/%node/mid/%/view'] = array(
'title' => 'NodeSymlink',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['node/%node/mid/%/original'] = array(
'title' => 'Original',
'page callback' => 'nodesymlinks_original',
'page arguments' => array(
1,
),
'access callback' => 'node_access',
'access arguments' => array(
'update',
1,
),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'weight' => 1,
);
$items['node/%node/mid/%/edit'] = array(
'title' => 'Edit',
'page callback' => 'nodesymlinks_original',
'page arguments' => array(
1,
'edit',
),
'access callback' => 'node_access',
'access arguments' => array(
'update',
1,
),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'weight' => 5,
);
$items['admin/structure/nodesymlinks'] = array(
'title' => 'NodeSymlinks',
'page callback' => 'nodesymlinks_admin',
'access arguments' => array(
'administer nodesymlinks',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'nodesymlinks.admin.inc',
);
$items['admin/structure/nodesymlinks/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/structure/nodesymlinks/settings'] = array(
'title' => 'Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'nodesymlinks_settings',
),
'access arguments' => array(
'administer nodesymlinks',
),
'type' => MENU_LOCAL_TASK,
'file' => 'nodesymlinks.admin.inc',
);
return $items;
}