Skip to content

Commit

Permalink
#192: Switch to pulling main menu from what was set in config instead…
Browse files Browse the repository at this point in the history
… of hard coding to 'main-menu'
  • Loading branch information
Josh Walker committed Aug 27, 2015
1 parent f110f00 commit 8b214fc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions template.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,10 @@ function kalatheme_process_page(&$variables) {
$variables['action_links'] = FALSE;
}

// Get the entire main menu tree.
$main_menu_tree = array();
$main_menu_tree = menu_tree_all_data('main-menu', NULL, 2);
// Get the menu tree for the menu that is set as 'Source for the Main links'.
$main_links_menu = variable_get('menu_main_links_source', 'main-menu');
$main_menu_tree = menu_tree_all_data($main_links_menu, NULL, 2);

// Add the rendered output to the $main_menu_expanded variable.
$variables['main_menu_expanded'] = menu_tree_output($main_menu_tree);

Expand Down

0 comments on commit 8b214fc

Please sign in to comment.