[development] add a block in my custom php code
Paolo Mainardi
paolomainardi at gmail.com
Tue Mar 10 18:06:02 UTC 2009
On Tue, Mar 10, 2009 at 6:50 PM, Aldo Martinez Selleras <aldo at caonao.cu>wrote:
> hello everyone...
>
> i have write a custom page where i'll show a custom content generated from
> the
> URL vars, but i need add a drupal block inside this code, how can i do
> this!?
>
> <div class="welcome"><h2>Welcome</h2><p><?php print
> $node->body; ?></p></div>
> </div>
> <div class="popular">
<?php
$block = module_invoke('block', 'block', 'view', YOUR_BLOCK_ID);
print $block['content'];
?>
> </div>
You can reveal YOUR_BLOCK_ID from the admin block page or inspecting the id
of the block output generated. ;)
P.
--
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/c5034ed6/attachment.htm
More information about the development
mailing list