Tuesday 18 November 2008 3:58:32 am
Hi All,
I need a template which should display related images one at the time. I use this code to fetch related images and to display the first image:
{foreach $node.data_map.images.content.relation_list as $relatedImage}
{def $obj=fetch('content', 'object',
hash('object_id', $relatedImage.contentobject_id))}
{attribute_view_gui attribute=$obj.data_map.image image_class='original'}
{undef $obj}
{break}
{/foreach}
My problem is that in the loop above I need a break else all related images will be shown. What I want to do is fetch all related images, show the first image and add navigation to navigate through the other images. I tried to access the related images separately but somehow I am only able to display all related images. Any suggestions how to navigate through each related image separately? Thanks!
|