The module works generally for me, but in some cases the HTML code is printed out, which makes it look like:
<h2 class="title">
<a href="<link>"><a href="<link>" class="block-title-link"><block-title></a></a>
</h2>
block.tpl.php looks like this:
<div id="block-<?php print $block->module . '-' . $block->delta; ?>" class="<?php print $classes; ?>"><div class="block-inner">
<?php if ($block->subject): ?>
<h2 class="title">
<?php
if ($block->title_link){
print l($block->subject, $block->title_link);
} else {
print $block->subject;
}
?>
</h2>
<?php endif; ?>
<div class="content">
<?php print $block->content; ?>
</div>
<?php print $edit_links; ?>
</div></div> <!-- /block-inner, /block -->
Comments
Comment #1
NidSquid commentedExact same problem here. Problem appeared on Friday after upgrading to the version 6.x-1.5, running on Drupal 6.16. Also running a few custom block templates that use the same code that OP posted above.
Comment #2
ngmaloney commentedHello,
Per several requests, I modified how the link gets rendered. The module no-longer requires a separate block.tpl.php. Simply output the $block->subject in your template file. You can now use a default block.tpl.php.
Feel free to DM or Gchat (ngmaloney at gmail) and I can provide assistance.
Comment #3
walkero commentedI have the same problem. If the title has & in it then it shows it as it's html equivalent. But I did a workaround.
change line 73 of block_titlelink.module to:
$vars['block']->subject = l($vars['block']->subject, $title_link, array('attributes' => array('class' => 'block-title-link'), 'html'=>'true'));
So now it gets the html code in the title and shows it right.
Comment #4
grasmash commentedthat's less of a workaround and more of a fix. thanks, that should be committed!
Comment #5
ngmaloney commentedI will test and add to module. Thanks for the contribution.
Comment #6
alexgreyhead commented#3 (http://drupal.org/node/792742#comment-3213084) works perfectly for me too - thank you Walkero.
Comment #7
yan commentedLooks like rtbc...
Comment #8
ngmaloney commentedEnclosed is patch. Will push out a release shortly.
Comment #9
ngmaloney commentedPatch applied and committed to release 6.x-1.6