RSS Amplifier

Luca Corbo – · Oct 19, 2011

Drupal7: How Display Block Programmatically

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

If you want to display a block in your template: <? php $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:…

If you want to display a block in your template:

<?php
$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:

Read on /blog/drupal7-how-display-block-programmatically/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.