[development] add a block in my custom php code

Andrew Berry andrewberry at sentex.net
Tue Mar 10 18:41:16 UTC 2009


On 10-Mar-09, at 2:06 PM, Paolo Mainardi wrote:

> <?php
> $block = module_invoke('block', 'block', 'view', YOUR_BLOCK_ID);
> print $block['content'];
> ?>

I would consider creating a new region in your theme instead. Then you  
can assign and move any block to it through the block admin page as  
you see fit. Creating a region is pretty simple; I think the Zen theme  
has a decently documented method of doing it.

--Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2672 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20090310/271dcab4/attachment.bin 


More information about the development mailing list