[ic] Re: interchange-users digest, Vol 1 #1027 - 24 msgs

Martin Abell interchange-users@icdevgroup.org
Wed Jul 24 12:31:02 2002


On 7/24/02 12:00 PM, Alves wrote:

> From: "Philip Alves" <philthy@sympatico.ca>
> To: <interchange-users@icdevgroup.org>
> Date: Wed, 24 Jul 2002 00:05:41 -0400
> Subject: [ic] Question about image directories

> Hello all!
> 
> I think I may have a brain cramp and screwed up image placement.  Basically,
> I'm developing a B2B storefront and have others working on getting the
> images to me.  I'm using the foundation demo as a base and things have been
> going realtively smoothly until now.
> 
> The foundation demo has the images in the html document space here:
> /zarb/www/foundation/images
> 
> This is where the brain cramp comes in.  I asked the person doing the images
> to place them here:  /zarb/files/images
> 
> There are over 18000 images total, and this would be a big move if that's
> what it came down to.  Any way to fool Interchange into thinking that where
> the images are is actually  '/zarb/www/foundation/images' ?
> 
> Also, the person doing the images has created subdirectories named for the
> various categories in '/zarb/www/foundation/images/items' .  Is this ok, or
> do I have to have all items in the 'items' directory only?
> 
> Thanks in advance!
> 
> The Brain Cramp Kid

I think I'd use the mv command to move the pics into html space.  Then
you've got to put code on every result page and flypage to find the
directory.  One possibility I use is:
 [if-item-field image]
 [seti dir_item_pics] [item-field category] [/seti]
 [perl] $Scratch->{dir_item_pics} =~ s/ /_/g; return 0; [/perl]
   <IMG SRC="items/[scratch dir_item_pics]/[item-field image]"
                            ALT="[item-field title]" BORDER=0>
 [/if-item-field]</td>

The basis for this is that I eliminate spaces (that the category names may
have) when the directory name is created.  Thus the perl line to remove
spaces so the directory can be found again.

Martin Abell
Second Store On The Web