Posted by arne.olafson on March 1, 2012 at 11:49pm
I'm trying to place the contents of a block in a custom jQuery list. To start out I'd like to just try rendering the contents of a block into a page or block, but am having difficulties. Any help would be appreciated. Here's the php code I'm using:
<?php
$block = module_invoke('webform', 'block_view', 'client-block-103');
print render($block);
?>From instructions here:
http://drupal.org/node/1034524#comment-4100718
Update: This does not work for regular blocks either:
<?php
$block = module_invoke('block', 'block_view', '16');
print render($block);
?>
Comments
Fixed
I embedded the block in a View, and had better success, thanks to
http://api.drupal.org/api/drupal/includes%21module.inc/function/module_i...