The functions in theme/theme.inc displays does not respect the theme toggle settings(admin/appearance/settings). Is there a case to change the(below) to keep things in line with normal theme settings?
Changing as follows seems to work on a local version :
function template_process_pane_navigation(&$vars) {
$vars['main_menu'] = theme('links__system_main_menu', array(
'links' => $vars['main_menu'],
'attributes' => array('id' => 'main-menu', 'class' => array('links', 'clearfix', 'inline')),
'heading' => t('Main menu')
));
$vars['secondary_menu'] = theme('links__system_secondary_menu', array(
'links' => $vars['secondary_menu'],
'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'clearfix', 'inline')),
'heading' => t('Secondary menu')
));
$vars['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb()));
}
to
function template_process_pane_navigation(&$vars) {
if(!theme_get_setting('toggle_main_menu')) {
unset($vars['main_menu']);
} else {
$vars['main_menu'] = theme('links__system_main_menu', array(
'links' => $vars['main_menu'],
'attributes' => array('id' => 'main-menu', 'class' => array('links', 'clearfix', 'inline')),
'heading' => t('Main menu')
));
}
if(!theme_get_setting('toggle_secondary_menu')) {
unset($vars['secondary_menu']);
} else {
$vars['secondary_menu'] = theme('links__system_secondary_menu', array(
'links' => $vars['secondary_menu'],
'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'clearfix', 'inline')),
'heading' => t('Secondary menu')
));
}
if(!theme_get_setting('toggle_breadcrumb')) {
unset($vars['breadcrumb']);
} else {
$vars['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb()));
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | panels_everywhere-n1687872-3.patch | 1.43 KB | damienmckenna |
Comments
Comment #1
dig1 commentedI am doing some triage on this project. No activity has ocurred on this issue for approximately 20 months. Hopefully ok to Close (works as designed).
Comment #2
damienmckennaI believe we need to add a documentation note about it, or provide a way of controlling whether PE adheres to the theme settings.
Comment #3
damienmckennaThis verifies that the two menu variables actually contain something before passing them through the theme function.
Comment #4
damienmckennaCommitted.