Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
We have a theme as a subtheme of the Bootstrap theme. After upgrading from 3.14 to 3.16 we noticed that menu option "show as expanded" doesn't work anymore: items are always expanded, whatever the option selected for them. I tracked the problem and it is due to the difference in page.vars.php. In version 7.15 it is
// Primary nav.
$variables['primary_nav'] = FALSE;
if ($variables['main_menu']) {
// Build links.
$variables['primary_nav'] = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
whereas in 3.16 it is
// Primary nav.
$variables['primary_nav'] = FALSE;
if ($variables['main_menu']) {
// Load the tree
$tree = menu_tree_all_data(variable_get('menu_main_links_source', 'main-menu'));
// Localize the tree.
if ($i18n) {
$tree = i18n_menu_localize_tree($tree);
}
// Build links.
$variables['primary_nav'] = menu_tree_output($tree);
I'm not a developer so I don't know how to solve this issue, except using the code from 3.15 in 3.16
Comments
Comment #2
markhalliwell