function contemplate_menu in Content Templates (Contemplate) 6
Same name and namespace in other branches
- 5 contemplate.module \contemplate_menu()
- 7 contemplate.module \contemplate_menu()
Implementation of hook_menu().
File
- ./
contemplate.module, line 56 - Create templates to customize teaser and body content.
Code
function contemplate_menu() {
$items = array();
$items['admin/content/types/templates'] = array(
'title' => 'Content Templates',
'description' => 'Create templates to customize output of teaser and body content.',
'page callback' => 'contemplate_edit_type',
'access arguments' => array(
'administer templates',
),
'type' => MENU_LOCAL_TASK,
'weight' => 7,
);
$items['admin/content/templates'] = array(
'title' => 'Content Templates',
'description' => 'Create templates to customize output of teaser and body content.',
'page callback' => 'drupal_goto',
'page arguments' => array(
'admin/content/types/templates',
),
'access arguments' => array(
'administer templates',
),
);
$node_types = node_get_types();
foreach (node_get_types('types', NULL, TRUE) as $type) {
$type_url_str = str_replace('_', '-', $type->type);
$items['admin/content/node-type/' . $type_url_str . '/template'] = array(
'title' => 'Template',
'page callback' => 'contemplate_edit_type',
'page arguments' => array(
$type,
),
'access arguments' => array(
'administer templates',
),
'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
}
$items['admin/settings/contemplate'] = array(
'title' => 'Content Template Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'contemplate_system_settings',
),
'access arguments' => array(
'administer templates',
),
);
return $items;
}