Hi

What do I need to use in a custom node.tpl.php to show my node's Galleria?

Thanks

Glenn

Comments

glennnz’s picture

I am currently using:

<?php
   $block = module_invoke('views', 'block', 'view', 'view_name-block_1');
   print $block['content'];
?>

This block is created via a View with the image field displayed as a Galleria. If I add this block to a region it works perfectly, but for my site layout I need to modify the node.tpl.php.

The code above shows a single image, with no thumbnails...

Cheers

Glenn

glennnz’s picture

Priority: Normal » Critical

Bump

Thanks

Glenn

pribeh’s picture

I've tried everything to print the galleria outside of $node->content but to no avail. Can anybody help with this?

hexblot’s picture

I've been using the following simple snippet for a couple of production sites.
It assumes that you are using a CCK image field for your images, that is named field_images (rename as you wish):

<?php print $node->field_images[0]['view']; ?>

if you find this doesn't work for you, try outputting the whole node array to your browser using

<?php print "<pre>".print_r($node,1)."</pre>"; ?>

Warning: the output from that is LARGE, and contains sensitive information. Only use it on a non-production enviroment, when you are sure noone else is visiting your site :P

If you still cannot find what you need, just copy the output of the above and attach it so I can have a look.

If what you need is creating a galleria from the output of a view, then you should probably be using the Views Galleria module, which adds a Galleria output style to views.