XML Hotel Interface for Affiliates
 

V2 FAQ'S
About

Client Login

Email:

Password:


Server Check
Systems Requirements
 
 



Search:     Advanced search
Browse by category:
Glossary | Ask question



How do I display the primary hotel image on my page
Add comment
Views: 284
Comments: 0
This applies to hotel detail/overivew ,maps and prices pages

Paste the following into your template page
                <!--{* loop through the images and find the primary one *}-->
                <!--{foreach key=cid item=current_image from=$images_image}-->
                  <!--{if $current_image.primary == Y}-->
                  <!--{assign var="image_primary" value="Y"}-->
                  <img src="http:<!--{$current_image.url}-->" name="photo" class="photo" width="200" />
                  <!--{/if}-->
                  <!--{/foreach}--> 
                 
                  <!--{*
                  The next line check's if wct didn't set a primary image
                  if not then use first image
                  *}-->
                  <!--{if $image_primary != Y AND $images_image[0]}-->
                  <img src="http:<!--{$images_image[0].url}-->" name="photo" class="photo" width="200" />
                  <!--{/if}-->


Other questions in this category
How can I convert state codes or country codes to the name
How to I check to see if an value exists before I display html tags
How do I create a chain codes select box
How do I loop through the video's




©Copyright XML Systems Inc. 2006. All Rights Reserved.