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?
As of now, If I enable this block as a sidebar or something similar etc., this works, but within a page/story its not working.
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:
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
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
I use the "Insert block" module:
Inserts the contents of a block into into a node using [block:module=delta] tags