function power_menu_node_view in Power Menu 7
Implements hook_node_view().
File
- ./
power_menu.module, line 94 - 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_node_view($node, $view_mode = 'full') {
if ($view_mode == 'full') {
$item = power_menu_node_location($node);
if ($item) {
$current_power_menu = power_menu_get_menu();
menu_tree_set_path($current_power_menu, $item['href']);
//menu_set_item(NULL, $item);
$breadcrumbs = power_menu_get_breadcrumbs();
if (variable_get('power_menu_breadcrumb_title', FALSE)) {
$breadcrumbs[] = $node->title;
}
drupal_set_breadcrumb($breadcrumbs);
}
}
}