You are here

function menu_position_page_preprocess_callback in Menu Position 6

Implements hook_page_delivery_callback_alter().

This is the only hook that occurs after the page callback, but before hook_page_build (when blocks are added). We're using this hook for its timing, not its data.

1 string reference to 'menu_position_page_preprocess_callback'
menu_position_theme_registry_alter in ./menu_position.module
Implements hook_theme_registry_alter().

File

./menu_position.module, line 14
Provides menu links for dynamic positioning of nodes based on configurable rules.

Code

function menu_position_page_preprocess_callback() {
  $context = array();
  $context['path'] = $_GET['q'];
  if (arg(0) == 'node' && is_numeric(arg(1))) {
    $context['node'] = node_load(arg(1));
  }
  menu_position_evaluate_rules($context);
}