public
Created

Loading a block programatically

  • Download Gist
block.php
PHP
1 2 3 4 5 6 7
<?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);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.