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.
When you have the searchbox enabled the main div is not expanded correctly.
I tracked the bug down to the template.php
In Line 81 change
// set classes for "main" div
// if no sidebar content and no search box, expand the main div to full width
if (empty($vars['sidebar']) && empty($vars['sidebar_left']) && empty($vars['sidebar_right']) && empty($vars['search_box'])) {
if (empty($vars['mission']) || (!drupal_is_front_page() && (theme_get_setting('inf08_mission_display') == 'front'))) {
$vars['main_classes'] = 'no-sidebar';
}
}
to
// set classes for "main" div
// if no sidebar content and no search box, expand the main div to full width
if (empty($vars['sidebar']) && empty($vars['sidebar_left']) && empty($vars['sidebar_right'])) {
if (empty($vars['mission']) || (!drupal_is_front_page() && (theme_get_setting('inf08_mission_display') == 'front'))) {
$vars['main_classes'] = 'no-sidebar';
}
}
I havn't noticed any bad impact so far.
With best regards
XiaN
Comments
Comment #1
kong CreditAttribution: kong commentedOops, that's my bad.
The search box used to be located on the sidebar before I decided to move it to the header -- and I obviously forgot to change the code.
Thanks for the fix :)