[development] add a block in my custom php code

Paolo Mainardi paolomainardi at gmail.com
Tue Mar 10 21:32:39 UTC 2009


On Tue, Mar 10, 2009 at 7:41 PM, Andrew Berry <andrewberry at sentex.net>wrote:

> 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.
>

Yes clear, the region it's the standard way :) This is the "raw" mode to
call directly a block.

-- 
Paolo Mainardi

Vice Presidente Assoc.ILDN (http://www.ildn.net)
Blog: http://www.paolomainardi.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/development/attachments/20090310/b7acc505/attachment.htm>


More information about the development mailing list