You are here

function power_menu_ctools_render_alter in Power Menu 7

Same name and namespace in other branches
  1. 6 power_menu.module \power_menu_ctools_render_alter()

Implements 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 130
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, $data) {
  extract($data);
  if (!empty($task['admin path']) && $task['admin path'] == 'node/%node' && $page) {
    power_menu_nodeapi($contexts['argument_nid_1']->data, 'view', NULL, $page);
  }
}