Jun
14
How To Place A Drupal Block Anywhere On Your Site
Posted by The Elf on Sat, 14 June, 2008 - 11:46
You might have noticed on the homepage of my site I have the 'Recent Comments' block integrated and floating inside my recent posts. Taught I would share how to do this. This is actually quite simple to do, all you need is this code:
<?php
$block = module_invoke('module_name', 'block', 'view', 0);
print $block['content'];
?>
Place that code anywhere you want a block to appear, just simply replace module_name with the name of the block you want to be shown, for my comment block it was as simple as changing it to comment
