First off, amazing module. I love it.

One issue I found, though. If you have manually created blocks (created with Add Block in the admin interface), the titles don't show up when the blocks are rendered. This isn't true for other types of blocks. I tried a Views block, and the title showed up fine.

CommentFileSizeAuthor
#3 block_title.patch757 bytesgloaguen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nvanhove’s picture

It seems this is a Drupal 6 bug:
http://drupal.org/node/126070

nvanhove’s picture

The problem is in this line:

$array = module_invoke($block->module, 'block', 'view', $block->delta);

(in node_level_blocks_preprocess_page)
When the module is "block" , the subject is not returned.

Until this bug is fixed; we could use the following code:

  $array = module_invoke($block->module, 'block', 'view', $block->delta);
  if($block->module == 'block') {
    $sql = "SELECT b.title FROM {blocks} b where bid = %d";
    $title = db_result(db_query($sql, $block->bid));
    if($title != "" && $title!="<none>") $array['subject'] = $title;
}
gloaguen’s picture

Status: Active » Patch (to be ported)
FileSize
757 bytes

I have found the solution for this problem.

When the field 'title' isset in the table 'blocks' then the default title is overwritten.
This also fix the missing title for manually added blocks.

gloaguen’s picture

Assigned: Unassigned » gloaguen
Status: Patch (to be ported) » Closed (fixed)

This is now fixed in version 6.x-1.1

  • Commit 0383a5c on master, 7.x-2.x by gloaguen:
    Issue #811288 by zengenuity: Fix block title