diff --git a/sites/all/themes/unl_wdn/template.php b/sites/all/themes/unl_wdn/template.php index 96194447648b301b0125a2ee525fdc0e65e9e93f..39d6f1c095837ba5d6f72fde2e71128025a6889e 100644 --- a/sites/all/themes/unl_wdn/template.php +++ b/sites/all/themes/unl_wdn/template.php @@ -24,12 +24,11 @@ function unl_wdn_block_view_alter(&$data, $block) { */ function _unl_wdn_block_view_system_main_menu_alter(&$data, $block) { $current_menu_link = _unl_wdn_get_current_menu_link(); - if (!$current_menu_link) { - return; - } - $submenu = _unl_wdn_get_current_submenu($data['content'], $current_menu_link->mlid); - if (!theme_get_setting('drill_down') && $submenu && $submenu['#original_link']['depth'] > 1) { - $data['content'] = $submenu['#below']; + if ($current_menu_link) { + $submenu = _unl_wdn_get_current_submenu($data['content'], $current_menu_link->mlid); + if (!theme_get_setting('disable_drill_down') && $submenu && $submenu['#original_link']['depth'] > 1) { + $data['content'] = $submenu['#below']; + } } $data['content'] = _unl_wdn_limit_menu_depth($data['content'], 2); } @@ -108,7 +107,7 @@ function unl_wdn_html_head_alter(&$head_elements) { } // If we are in a drilled down menu, change the home link to the drilled down item. - if (!theme_get_setting('drill_down')) { + if (!theme_get_setting('disable_drill_down')) { $current_menu_link = _unl_wdn_get_current_menu_link(); if ($current_menu_link && $current_menu_link->depth > 1) { $home_path = drupal_get_path_alias($current_menu_link->link_path); diff --git a/sites/all/themes/unl_wdn/theme-settings.php b/sites/all/themes/unl_wdn/theme-settings.php index 526b7a3944b33f1009f3eeea23c2a5b052074e33..a11a4729e70374addb6b0cd3dca9c07b3983fbdc 100644 --- a/sites/all/themes/unl_wdn/theme-settings.php +++ b/sites/all/themes/unl_wdn/theme-settings.php @@ -113,10 +113,10 @@ function unl_wdn_form_system_theme_settings_alter(&$form, &$form_state) { '#default_value' => theme_get_setting('sidebar_second_width'), '#description' => t('Enter only the numeral, for grid4 just enter 4.'), ), - 'drill_down' => array( + 'disable_drill_down' => array( '#type' => 'checkbox', '#title' => t('Disable drill-down menus'), - '#default_value' => theme_get_setting('drill_down'), + '#default_value' => theme_get_setting('disable_drill_down'), '#description' => t('Turns off changing the navigation if you are 2+ levels deep with even deeper enabled menu links.'), ), 'zen_forms' => array(