Skip to content

Instantly share code, notes, and snippets.

@driesd
Created August 29, 2013 10:09
Show Gist options
  • Save driesd/6376358 to your computer and use it in GitHub Desktop.
Save driesd/6376358 to your computer and use it in GitHub Desktop.
Render a specific block
<?php
//CUSTOM BLOCK RENDERING
function mytheme_block_render($module, $block_id) {
$block = block_load($module, $block_id);
$block_content = _block_render_blocks(array($block));
$build = _block_get_renderable_array($block_content);
$block_rendered = drupal_render($build);
print $block_rendered;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment