Download & Extend

header stays after enter null tag

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

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

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->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

Status:active» needs review

Forgot to set to 'needs review'.

#3

tested and works perfect.

#4

Patch works fine.

#5

Status:needs review» closed (duplicate)

Duplicate of #172876: Block Titles bar shown even if block title empty

nobody click here