blocks MDL-19902: were seeing empty block columns on the front page when not logged in.

It turns out the only reliable way to find out whether blocks will appear is to get the contents. :-(
This commit is contained in:
tjhunt 2009-07-22 06:38:26 +00:00
parent 78d27a9049
commit fb3611a567
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@
a multi-column cross-browser layout too, so this is a temporary hack. -->
<table id="layout-table" summary="layout">
<tr>
<?php if ($PAGE->blocks->region_has_content('side-pre')) { ?>
<?php if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) { ?>
<td id="region-side-pre" class="block-region">
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
</td>
@ -37,7 +37,7 @@
<td id="content">
[MAIN CONTENT GOES HERE]
</td>
<?php if ($PAGE->blocks->region_has_content('side-post')) { ?>
<?php if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { ?>
<td id="region-side-post" class="block-region">
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
</td>

View File

@ -32,7 +32,7 @@
a multi-column cross-browser layout too, so this is a temporary hack. -->
<table id="layout-table" summary="layout">
<tr>
<?php if ($PAGE->blocks->region_has_content('side-pre')) { ?>
<?php if ($PAGE->blocks->region_has_content('side-pre', $OUTPUT)) { ?>
<td id="region-side-pre" class="block-region">
<?php echo $OUTPUT->blocks_for_region('side-pre') ?>
</td>
@ -40,7 +40,7 @@
<td id="content">
[MAIN CONTENT GOES HERE]
</td>
<?php if ($PAGE->blocks->region_has_content('side-post')) { ?>
<?php if ($PAGE->blocks->region_has_content('side-post', $OUTPUT)) { ?>
<td id="region-side-post" class="block-region">
<?php echo $OUTPUT->blocks_for_region('side-post') ?>
</td>