Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By LTech on
How do I load the block title in node.tpl.php?
I can get the content using:
$block = module_invoke('views', 'block_view', 'name-block_1');
print render($block['content']);
and I've tried print render($block['title']); and print render($block['header']); but I can't work out what I should be calling in the array to get the title.
Thanks so much.
Comments
Would this not be in
Would this not be in block.tpl.php in the block module folder?
You only seem to be able to
You only seem to be able to call print render($block['subject']); from the block.tpl.php file but this doesn't give me the title of the block.
Is there a way to call the view title if I can't call the block title?
Thanks, for your help.
Sorry. I'm not too sure.
Sorry. I'm not too sure. Hopefully someone might provide the answer for you.