Implements hook_menu().
function book_menu() {
$items['admin/structure/book'] = array(
'title' => 'Books',
'description' => "Manage your site's book outlines.",
'route_name' => 'book_admin',
);
$items['admin/structure/book/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/structure/book/settings'] = array(
'title' => 'Settings',
'route_name' => 'book_settings',
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_LOCAL_TASK,
'weight' => 100,
);
$items['admin/structure/book/%node'] = array(
'title' => 'Re-order book pages and change titles',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'book_admin_edit',
3,
),
'access callback' => '_book_outline_access',
'access arguments' => array(
3,
),
'type' => MENU_CALLBACK,
'file' => 'book.admin.inc',
);
$items['book'] = array(
'title' => 'Books',
'route_name' => 'book_render',
'type' => MENU_SUGGESTED_ITEM,
);
$items['book/export/%/%node'] = array(
'page callback' => 'book_export',
'page arguments' => array(
2,
3,
),
'access callback' => 'book_export_access',
'access arguments' => array(
3,
),
'type' => MENU_CALLBACK,
'file' => 'book.pages.inc',
);
$items['node/%node/outline'] = array(
'title' => 'Outline',
'page callback' => 'book_outline',
'page arguments' => array(
1,
),
'access callback' => '_book_outline_access',
'access arguments' => array(
1,
),
'type' => MENU_LOCAL_TASK,
'weight' => 2,
'file' => 'book.pages.inc',
);
$items['node/%node/outline/remove'] = array(
'title' => 'Remove from outline',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'book_remove_form',
1,
),
'access callback' => '_book_outline_remove_access',
'access arguments' => array(
1,
),
'file' => 'book.pages.inc',
);
return $items;
}