Skip to content

Instantly share code, notes, and snippets.

@hanamizuki
Last active December 10, 2015 02:58
Show Gist options
  • Save hanamizuki/4371948 to your computer and use it in GitHub Desktop.
Save hanamizuki/4371948 to your computer and use it in GitHub Desktop.
/* Print custom block content */
$block = module_invoke('MODULE_NAME','block_view','DELTA');
print render($block['content']);
/* Print the whole custom block (with divs, title etc.) */
$block = block_load('block','1');
print drupal_render(_block_get_renderable_array(_block_render_blocks(array($block))));
/* Print a views block */
$block = module_invoke('views','block_view','print_block_test_view-block');
print render($block);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment