]> git.mjollnir.org Git - moodle.git/commitdiff
blocks MDL-19902: were seeing empty block columns on the front page when not logged in.
authortjhunt <tjhunt>
Wed, 22 Jul 2009 06:38:26 +0000 (06:38 +0000)
committertjhunt <tjhunt>
Wed, 22 Jul 2009 06:38:26 +0000 (06:38 +0000)
It turns out the only reliable way to find out whether blocks will appear is to get the contents. :-(

theme/standard/layout-home.php
theme/standard/layout.php

index e5c45d511f67c55734192745e214e6be8fce31f2..452e6568a70d2eb8009264868955e7ad327a74c3 100644 (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>
index 1b9bbaff5e315ff5339b7775fe878c804fb14859..7e6a41062d3b4ab5723e7d6fadb3a2eb48901652 100644 (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>