[ic] How to default image display

sb at airdelights.com sb at airdelights.com
Sat Apr 29 18:56:20 EDT 2006

>>> I'm want to display an image in a simple fly page that calls the
>>> image
>>> from items/[item-code].jpg If the image is not in the diretory for 
>>> that part, I want interchange to display a default image. I have 
>>> read in interchange mailing list that the data tag and if tag
>> is
>>> a good way to do this, but I'm having trouble getting it to work.
>> This
>>> is what I have so far, but I have not been able to get it to work:
>>> <img src=[if type=file term="items/[item-code].jpg"]
>>> [else]
>>> 	items/1sna.jpg
>>> [/else]
>>> [/if] Border="0">
>> just a wild guess but try
>> [if type=file term="images/items/[item-code].jpg"]  ...
>> I gave it a try but did not make the item image display, still only
>> get default image to display. steve
> Hi,
> Below code works in a foundation store where the images are located 
> at: <docroot>/standard/images/items/
> Just create a testpage and put the code below in, replace <STICK HERE 
> CODE> with one of your item codes.  It should show up twice, because
> CODE> there
> are two ways below to do it. Also check the following variables:
> IMAGE_DIR       /standard/images        Directories and Paths
> SAMPLEHTML      /www/htdocs/standard    Directories and Paths
> SAMPLEURL       http://its.a.server.nl/standard    Directories and
> [fly-list code="<STICK HERE ITEM CODE>"]
> <img src="[if type=file term="images/items/[item-code].jpg"]
> items/[item-code].jpg"
> [else]
> items/1sna.jpg"
> [/else]
> [/if] Border="0">
> [if type=file term="images/items/[item-code].jpg"]
> <img src="items/[item-code].jpg">
> [else]
> <img src="items/1sna.jpg">
> [/else]
> [/if]
> [/fly-list]
> CU,
> Gert
> Thank you Gert.  I tried both of these and had same effect, only 
> showed the default items/1sna.jpg image.  So I tried changing the 
> typ=file to type=image and then it displays the item-code image, but 
> will not display the items/1sna.jpg default image for the items that 
> have no image in the items/ folder.
> Any suggestions?

what are the settings for you for:

?  It appears your path in the [if type=  is incorrect and is therefor
finding the files ... not totally sure - but what's the permissions of
image files?  perhaps IC can't read the files .... 



This code on the fly page gave the results below.

<img src="[if type=file term="items/[item-code].jpg"]
[/if] Border="0"> 

Results of above code when looking at source code of fly page.

<img src="/images/

I created both the image for the default, 1sna.jpg, and also the one
item image I have named 0206146.jpg which is the code used for one of
the products.  Both images are in the same folder
http://www.airdelights.com/images/items/0206146.jpg and also
http://www.airdelights.com/images/items/1sna.jpg  Both images have the
same permissions and are accessable.
Not sure with the [if type=file term="items/[item-code].jpg"] does not
display the image for the item with that code
http://www.airdelights.com/sloanparts-items/0206146.html  I am using the
[item-code] on this page to also display the item code above the price,
is there any issue with using this tag twice on a fly page?

interchange-users mailing list
interchange-users at icdevgroup.org

More information about the interchange-users mailing list