[support] Adding Block in a page
Fred Jones
fredthejonester at gmail.com
Tue Apr 8 17:07:24 UTC 2008
tsk1979 wrote:
> I was googling for how to post a block in a page, can came across some php
> code
> <?php
> $block = module_invoke('couloir_slideshow1', 'block', 'view', 1);
> print $block['content'];
> ?>
>
> The aim is to show the slideshow in a page/story
>
> But its not working. I checked the slideshow standalone, and it works,
> however in the block it does not.
> I also don't under stand the "number" after 'view'. What is that supposed to
> mean?
Presuming Drupal 5 see here:
http://api.drupal.org/api/function/module_invoke/5
that number is passed to:
http://api.drupal.org/api/function/hook_block/5
Beyond that I don't know. See here:
http://drupal.org/node/164799
that your code appears correct, but there is also a sample there using
25, not 1, and also one with no number there at all.
HTH,
Fred
More information about the support
mailing list