Skip to content

Instantly share code, notes, and snippets.

@ivandoric
Created April 23, 2014 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivandoric/11215395 to your computer and use it in GitHub Desktop.
Save ivandoric/11215395 to your computer and use it in GitHub Desktop.
drupal: Add block to node
<?php
$block = block_load('module_name', 'block_name');
$output = drupal_render(_block_get_renderable_array(_block_render_blocks(array($block))));
print $output;
//module_name is the name of module that outputs the block, eg. webform
//block_name is the name of the block, you can find it out by hovering on configure link on block admin page, eg. client-block-19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment