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

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

#1

gcopenhaver - March 30, 2009 - 13:50

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>

AttachmentSize
block.tpl_.php_.patch 1.09 KB

#2

gcopenhaver - March 30, 2009 - 13:51
Status:active» needs review

Forgot to set to 'needs review'.

#3

adjustreality - March 31, 2009 - 03:57

tested and works perfect.

 
 

Drupal is a registered trademark of Dries Buytaert.