[development] add a block in my custom php code

Ashraf Amayreh mistknight at gmail.com
Thu Mar 12 23:51:29 UTC 2009


I think the better way of doing this is to pass regions to the node
template.

Not sure where this is documented, but if you check the phptemplate section
under regions you're bound to find something about it.

On Tue, Mar 10, 2009 at 11:32 PM, Paolo Mainardi <paolomainardi at gmail.com>wrote:

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



-- 
Ashraf Amayreh
http://aamayreh.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.drupal.org/pipermail/development/attachments/20090313/c7b7317e/attachment.htm>


More information about the development mailing list