I have created a block for adding image from drupal backend with title name "image". Now i want to add this block into page.tpl. How can i do that by using code.
Here is the sample code
$imageblock = block_load('block', '155'); $output = drupal_render(_block_get_renderable_array(_block_render_blocks(array($imageblock))));
$output will have the generate html for the block . This can be rendered in the template file using
If the block is created using views, you may have to use
$imageblock = block_load('views', 'block_name'); instead of loading the block using the block id.