You are here

function context_reaction_menu::execute in Context 6

Same name and namespace in other branches
  1. 6.3 plugins/context_reaction_menu.inc \context_reaction_menu::execute()
  2. 7.3 plugins/context_reaction_menu.inc \context_reaction_menu::execute()

If primary + secondary links are pointed at the same menu, provide contextual trailing by default.

1 method overrides context_reaction_menu::execute()
context_reaction_breadcrumb::execute in plugins/context_reaction_breadcrumb.inc
Override of execute().

File

plugins/context_reaction_menu.inc, line 56

Class

context_reaction_menu
Expose menu items as context reactions.

Code

function execute(&$vars) {
  if (variable_get('menu_main_links_source', 'main-menu') == variable_get('menu_secondary_links_source', 'user-menu')) {
    $vars['main_menu'] = theme_get_setting('toggle_main_menu') ? $this
      ->menu_navigation_links(variable_get('menu_main_links_source', 'main-menu')) : $vars['main_menu'];
    $vars['secondary_menu'] = theme_get_setting('toggle_secondary_menu') ? $this
      ->menu_navigation_links(variable_get('menu_secondary_links_source', 'secondary-links'), 1) : $vars['secondary_menu'];
  }
  $vars['main_menu'] = $this
    ->menu_set_active($vars['main_menu']);
  $vars['secondary_menu'] = $this
    ->menu_set_active($vars['secondary_menu']);
}