Is it possible to print a contemplate in a block?
I know it wasn't possible in the 5.0 versions of contemplate, but I am wondering if things might have changed?
Is it possible to print a contemplate in a block?
I know it wasn't possible in the 5.0 versions of contemplate, but I am wondering if things might have changed?
Comments
Comment #1
jrglasgow commentedYour title and the content of the post are opposite meaings.
Do you want instruction on printing the contents of a block in a template.
or instructions on how to print the results of a template in a block?
Comment #2
big_smile commentedSorry - I want to know how to print a block inside a contemplate.
Sorry for this mix up!
Comment #3
tyler-durden commentedI found this post by searching the exact title - I am looking to find a way to add blocks to a Content Template also. My guess is that this is not possible, correct?
Comment #4
jrglasgow commentedYes it is possible to print a block in a content template.
First you need to know the module that provides the block, then you need to know which block it is according to that module. Then you invoke the hook_block of that module.
Take for instance the Search Form block provided by the search module. Here is the path to configure the block from the /admin/build/block page:
From this path I know that the module is 'search' and the $delta is '0'. I would write my code like this:
This works great for most blocks, but if the block you want to embed is a view I suggest views_embed_view().
Comment #5
jrglasgow commentedComment #7
subir_ghoshI have a module with the following:
admin/build/block/configure/views/reports-block_1I am usin this in the contemplate:
?>
Doesn't work.
PS: I am using D6.