Skip to content

Commit

Permalink
Fix for Anomaly Docking issue, MDL-23816
Browse files Browse the repository at this point in the history
  • Loading branch information
jstabinger committed Aug 15, 2010
1 parent 1bb1e5b commit b3f5291
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions theme/anomaly/layout/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
$hasheading = ($PAGE->heading);
$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
$hasfooter = (empty($PAGE->layout_options['nofooter']));
$hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
$hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
$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);


$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';
}

Expand Down Expand Up @@ -60,15 +63,15 @@
</div>

<?php if ($hassidepre) { ?>
<div id="region-pre">
<div id="region-pre" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
</div>
</div>
<?php } ?>

<?php if ($hassidepost) { ?>
<div id="region-post">
<div id="region-post" class="block-region">
<div class="region-content">
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
</div>
Expand Down

0 comments on commit b3f5291

Please sign in to comment.