function power_menu_ctools_render_alter in Power Menu 6
Same name and namespace in other branches
- 7 power_menu.module \power_menu_ctools_render_alter()
implementation of hook_ctools_render_alter().
When we use CTools Pagemanager, hook_nodeapi (view) is not being called, because ctools alters the hook_menu and redirects the page callback to it's own function in node_view.inc Well, power_menu never knows that a node is actually being displayed -> so we alter the ctools_render function and start the normal power_menu_nodeapi procedure
Parameters
array $info:
boolean $page:
array $args:
array $contexts:
array $task:
unknown_type $subtask:
File
- ./
power_menu.module, line 127 - This module provides some additional menu features. The features are not actually new, but are part of other modules. it's though very cumbersome to creating a new menu item, because one has to go to all the different places to configure these…
Code
function power_menu_ctools_render_alter($info, $page, $args, $contexts, $task, $subtask) {
if (!empty($task['admin path']) && $task['admin path'] == 'node/%node' && $page) {
power_menu_nodeapi($contexts['argument_nid_1']->data, 'view', NULL, $page);
}
}