Skip to content
Snippets Groups Projects
Commit 1cc0e9aa authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

Merge branch 'issue-592' of github.unl.edu:tsteiner2/UNL-CMS into issue-592

parents c5c29c31 567139bd
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment