diff --git a/theme/canvas/layout/frontpage.php b/theme/canvas/layout/frontpage.php index a8b573d1f0a..c2d54c8ec20 100644 --- a/theme/canvas/layout/frontpage.php +++ b/theme/canvas/layout/frontpage.php @@ -1,19 +1,24 @@ heading); -$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar()); -$hasfooter = (empty($PAGE->layout_options['nofooter'])); $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT); $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT); +$showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT); +$showsidepost = $hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT); + +$custommenu = $OUTPUT->custom_menu(); +$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); $bodyclasses = array(); -if ($hassidepre && !$hassidepost) { +if ($showsidepre && !$showsidepost) { $bodyclasses[] = 'side-pre-only'; -} else if ($hassidepost && !$hassidepre) { +} else if ($showsidepost && !$showsidepre) { $bodyclasses[] = 'side-post-only'; -} else if (!$hassidepost && !$hassidepre) { +} else if (!$showsidepost && !$showsidepre) { $bodyclasses[] = 'content-only'; } +if ($hascustommenu) { + $bodyclasses[] = 'has_custom_menu'; +} echo $OUTPUT->doctype() ?> htmlattributes() ?>> @@ -30,20 +35,24 @@ echo $OUTPUT->doctype() ?> -