Render the block programatically

Public

You can render the drupal block programmatically by using block_load() function. If you want to render any block in tpl file you can use the below snippet.

</> CopyGet raw version
php
  1. $block = block_load('MODULENAME', 'delta');
  2. $output = drupal_render(_block_get_renderable_array(_block_render_blocks(array($block))));
  3. print $output;