How to render a block in a node
This is how you can render a block in a node. First set your format to PHP and then find out what id your block has, in this case 76. The use the code below in your node body field.
This is how you can render a block in a node. First set your format to PHP and then find out what id your block has, in this case 76. The use the code below in your node body field.
This is how you can render a block in a node. First set your format to PHP and then find out what id your block has, in this case 76. The use the code below in your node body field.
<?php
$block = module_invoke('block', 'block', 'view', 76);
print $block['content'];
?>
This module creates two blocks with listings from current forum installation.
This code is useful when you want to customize a block, as in this case wrap a transparent image link around a flash object in a specific region to get a flash object to become a link.
Add this code in your themes template.tpl.php and paste the flash object code in a new block and publish it the my_region.
In your themes block.tpl.php you can add a litle script that converts the title to a class to the wrapping div tag. First add the following in a php section:
<?php
$block_class_title = 'block-'.strtolower(str_replace(" ", "-", $block->subject));
?>