function page_manager_node_view_page_manager_tasks in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 page_manager/plugins/tasks/node_view.inc \page_manager_node_view_page_manager_tasks()
Specialized implementation of hook_page_manager_task_tasks(). See api-task.html for more information.
File
- page_manager/
plugins/ tasks/ node_view.inc, line 16 - Handle the 'node view' override task.
Code
function page_manager_node_view_page_manager_tasks() {
return array(
// This is a 'page' task and will fall under the page admin UI.
'task type' => 'page',
'title' => t('Node template'),
'admin title' => t('Node template'),
'admin description' => t('When enabled, this overrides the default Drupal behavior for displaying nodes at <em>node/%node</em>. If you add variants, you may use selection criteria such as node type or language or user access to provide different views of nodes. If no variant is selected, the default Drupal node view will be used. This page only affects nodes viewed as pages, it will not affect nodes viewed in lists or at other locations. Also please note that if you are using pathauto, aliases may make a node to be somewhere else, but as far as Drupal is concerned, they are still at node/%node.'),
'admin path' => 'node/%node',
// Menu hooks so that we can alter the node/%node menu entry to point to us.
'hook menu' => 'page_manager_node_view_menu',
'hook menu alter' => 'page_manager_node_view_menu_alter',
// This is task uses 'context' handlers and must implement these to give the
// handler data it needs.
'handler type' => 'context',
'get arguments' => 'page_manager_node_view_get_arguments',
'get context placeholders' => 'page_manager_node_view_get_contexts',
// Allow this to be enabled or disabled:
'disabled' => variable_get('page_manager_node_view_disabled', TRUE),
'enable callback' => 'page_manager_node_view_enable',
'access callback' => 'page_manager_node_view_access_check',
);
}