Posted by: mrkandy on: Март 24, 2010
Sometimes you want to be able to embed a block in the middle of a page, in the header or footer of a view.
To do that, you can actually invoke the block wherever you want using the following php code:
/**
* Render block
* @param int|string $id block id
* @param string $module module name (default: block)
* @return string block markup
*/
function block_render($id, $module = 'block') {
$block = (object)module_invoke($module, 'block', 'view', $id);
$block->module = $module;
$block->delta = $id;
return theme('block', $block);
}