Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Displaying Additional Image on Custom Template Rate Topic   - - - - -

 

Posted 19 February 2013 - 11:22 AM #1

I'm creating a custom template which breaks out of the usual design.

I need this design to show the first additional image that is shown, but i cant find anywhere that lists variables that are used to display this.

The main image is displayed using the following
{include file="common_templates/image.tpl" obj_id=$obj_id_prefix images=$product.main_pair object_type="product" image_width='460px' image_height='460px'}

Which part do i change in order to get it to point at the additional image?



Thanks in advance.

 

Posted 25 February 2013 - 03:37 PM #2

never mind, I've worked it out by printing all of the $product variables, then doing a foreach loop on the image_pairs

   {$product.full_description|unescape}
   {foreach from=$product.image_pairs item=imageid}
    {if $imageid.position=='0'}
	 {$imageid.detailed.image_path}
    {/if}
    {if $imageid.position=='1'}
	 {$imageid.detailed.image_path}
    {/if}
    {if $imageid.position=='2'}
	 {$imageid.detailed.image_path}
    {/if}
   {/foreach}
Which outputs additional images in position 0 - 2