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

http://localhostr.com/files/c47425/Picture+1.png

CommentFileSizeAuthor
#1 block.tpl_.php_.patch1.09 KBpreventingchaos

Comments

preventingchaos’s picture

StatusFileSize
new1.09 KB

I changed isset($block->subject) to !empty($block->subject), which now checks to see if the variable is empty, rather than set. Apparently $block->subject is not set to NULL when leaving the block title blank or entering <none>, so isset($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>
preventingchaos’s picture

Status: Active » Needs review

Forgot to set to 'needs review'.

adjustreality’s picture

tested and works perfect.

mrtoner’s picture

Patch works fine.

klaasvw’s picture

Status: Needs review » Closed (duplicate)