Drupal7: How Display Block Programmatically

October 2011 ยท 1 minute read

If you want to display a block in your template:

$block = block_load($module, $delta);
print render(_block_gAet_renderable_array( _block_render_blocks( array($block) )));

where:

$module Name of the module that implements the block to load.

$delta Unique ID of the block within the context of $module. Pass NULL to return an empty block object for $module.

Reference links:

comments powered by Disqus