Hi there,
Trying to insert a ddblock into a node template (node.tpl.php) file. It doesn't seem to work using:
<?php
$block = module_invoke('ddblock', 'block', 'view','3');
print $block['content'];
?>Do you know how I can do this? Thanks a lot for a great module.
Comments
Comment #1
ppblaauw commentedThe code is good.
Where did you put it in the node.tpl.php?
Just before or after the line:
print $contentWhen you put it in the node.tpl.php it would be shown in all nodes
Probably you want to put it in node-[***content-type-name***].tpl.php
to show it only in nodes of that content type
Can you attach your complete node.tpl.php file and can you send a link to the site.
Hope this helps you further, please let me know.
Comment #2
adshill commentedI removed $content as I needed to seperate body and title text. Unfortunately I can't give a link to the site as its just local at the moment.
The tpl file is already a specific node-type file. Something does appear but it is the images as 55px and they don't actually appear - just white spaces of 55px square in a row. The block should be 700px wide... It works fine when I put the snippet in a node body but I need this to be above all node content.
The code that it is generating is like this:
The tpl content is:
Thanks a lot for your help.
Adam
Comment #3
ppblaauw commentedI see now you use the basic options of the ddblock slideshow:
Maybe your content container setting in the ddblock config page is not correct.
Have a look at the faq question: I see only very small thumbnails and sometime the big images, what is wrong?
hope this helps you further, please let me know.
Comment #4
adshill commentedThanks for the info although I found this wasn't the problem - it was actually that I had the same ddblock in a block, but with my debugging I had used css to hide it. When I removed this block in the block settings everything was fine :)
Thanks,
Adam