$title has been removed from the block template variables in Drupal 7. However, block.tpl.php in this theme is still using that variable. That variable needs to be changed to $block->subject in order to display the title.

CommentFileSizeAuthor
#1 block_tpl_php_title-1210182-1.patch632 bytespaulmckibben
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

paulmckibben’s picture

Status: Active » Needs review
FileSize
632 bytes

Patch attached.

rovo’s picture

I just changed lines 11-13 in block.tpl.php to:

    <?php if ($block->subject): ?>
      <header><h2<?php print $title_attributes; ?>><?php print $block->subject ?></h2></header>
    <?php endif;?>

Not sure this was the best fix...

jensimmons’s picture

Status: Needs review » Fixed

Funny, it was right in block--views.tpl.php and block--menu.tpl.php, but I screwed it up in block.tpl.php.

Fixed. Thanks!

jensimmons’s picture

And yes, rob_dean, what you did is the fix. So your copy matches the new code in HTML5 Base.

rovo’s picture

Oh good, awesome!

Things are looking good for this Base!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.