header stays after enter null tag
adjustreality - March 29, 2009 - 23:28
| Project: | Deco |
| Version: | 6.x-1.1 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
when I enter the <none> Tag it seems that the header seems to stay and there is no way of getting rid of it. It does leave the header title blank, but the image remains.
really love everything else about the layout though! it's good stuff.
here is a screenshot of the issue

#1
I changed
isset($block->subject)to!empty($block->subject), which now checks to see if the variable is empty, rather than set. Apparently$block->subjectis not set to NULL when leaving the block title blank or entering<none>, soisset($block->subject)still returns TRUE, even though it's empty.I don't know if this is a bug or a feature, but I'll provide the patch, and here's the old and new code of the entire file:
Old block.tpl.php:
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module ?><?php print (isset($block->subject) ? ' block-title' : '') ?><?php print ($zebra ? ' block-'.$zebra : '') ?>"><div class="blockinner">
<?php if (isset($block->subject)): ?><h2 class="title"><?php print $block->subject; ?></h2><?php endif; ?>
<div class="content">
<?php print $block->content; ?>
</div>
</div>
</div>
New block.tpl.php
<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="block block-<?php print $block->module ?><?php print (!empty($block->subject) ? ' block-title' : '') ?><?php print ($zebra ? ' block-'.$zebra : '') ?>"><div class="blockinner">
<?php if (!empty($block->subject)): ?><h2 class="title"><?php print $block->subject; ?></h2><?php endif; ?>
<div class="content">
<?php print $block->content; ?>
</div>
</div>
</div>
#2
Forgot to set to 'needs review'.
#3
tested and works perfect.