Posted by adjustreality on March 29, 2009 at 11:28pm
| Project: | Deco |
| Version: | 6.x-1.1 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
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
Comments
#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.
#4
Patch works fine.
#5
Duplicate of #172876: Block Titles bar shown even if block title empty