Adding Block in a page
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. -- View this message in context: http://www.nabble.com/Adding-Block-in-a-page-tp16549560p16549560.html Sent from the Drupal - Support mailing list archive at Nabble.com.
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
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 -- Walter Garcia-Fontes Barcelonap
participants (3)
-
Fred Jones -
tsk1979 -
Walter Garcia-Fontes