Skip to content

Instantly share code, notes, and snippets.

@sirkitree
Created September 21, 2011 02:42
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 sirkitree/1231082 to your computer and use it in GitHub Desktop.
Save sirkitree/1231082 to your computer and use it in GitHub Desktop.
Loading a block programatically
<?php
$module = "boxes"; // this is the name of whatever module actually creates the block, I so happen to love boxes.
$delta = "video_homepage_footer"; // this is the machine name of the block (or in this case box)
$block = (object) module_invoke($module, 'block', 'view', $delta);
$block->module = $module;
$block->delta = $delta;
print theme('block', $block);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment