[ic] usertag image: Does it work?

Jonathan Clark interchange-users@icdevgroup.org
Wed Sep 11 10:20:03 2002


> >>I have attempted to use the usertag
> >>image and seem to be running into a
> >>problem. I have attempted to use
> >>
> >>[image [loop-field image] imagesubdir=thumb]
> >>
> >
> >
> > This won't work. You have a parameter with a space in it. You
> > need:Interchange will treat this as you passing three parameters.
> >
> > [image src="[loop-field image]" imagesubdir=thumb]
> >
> >
> >>[image [item-field image]
> >>imagesubdir=thumb]
> >>
> >>[image [item-code]]
> >>[image [loop-code]]
> >
> >
> > This is correct syntax and should work, assuming that [item-code] or
> > [loop-code] is set, and is either a valid filepath or an sku in
> the products
> > table.
> >
> >
> >>and many more variations.
> >>I am not sure if this is a
> >>working tag since a search
> >>in the docs for image.tag
> >>or image tag have nothing
> >>The only info outside of the
> >>list was perldoc in the
> >>usertag itself
> >
> >
> > Yes, many things in interchange are self-documenting. The usertag file
> > itself is the best place to look.
> >
> >
> >>Please let me know if this is
> >>a working tag or not, I was certian
> >>that this tag was simple.
> >>
> >>If it does work, then what the
> >>heck am I doing wrong.
> >>
> >>all of my images are named
> >>not from the sku. So sku
> >>image name should not work.
> >
> >
> > have you tried:
> >
> > 	[image src=/path/to/image/file.gif]
> > or
> > 	[image os28004]
> >
> > to see if it works without passing ITL to it? The path is in
> html space. You
> > would also need to have IMAGE_DIR set correctly.
> >
> > good luck!
> >
>
> I guess I need to explain in what
> context this is in.
>
> I actually have a working store and
> around 500 products in it.
>
> I am working on this page
>
> http://www.blossomland.com/bl/beeswax.html
>
> Now what i am doing is taking this page
> and turning it into a template.
> Well I figured what the hey lets tell
> the browser the file size as well on the
> fly to speed up the page download since
> I am putting all this other info out i.e
> (alt tags ...).
> I read some time ago about the image
> tag. I never saw it used in the demo
> store so I said damn lets make this work
> better.
>
> Docs said that if I put a http path in
> it will not check and is always accepted
> and per your example it worked.
>
> And by the way I am in a loop hence the
> use of loop-code
>
> (each of the following yield the
> equivalent output)
>
> [image
> src="http://wwww.blossomland.com/images/thumb/www500.jpg"]
>
> [image sku="[loop-code]"
> src="http://wwww.blossomland.com/images/thumb/www500.jpg"]
>
> (with and without quotes on loop-code)
>

try:

[image src=thumb/wwww500.jpg] (The usertag requires a path rather than a uri
to get the size.)

and

[image src=www500] (assuming a www500 is a valid product)


> output for either is
>
> <img
> src="http://wwww.blossomland.com/images/thumb/www500.jpg">
>
> so it kicks out the img src and the url
> but not a thing on the sku like the
> description field as would be expected
> hence the sku= field.
>
>
> Other variations yield nothing.
>
> Also to check one more thing, the images
> are under a symlink, should this matter?

There should be a symlink in your interchange catalog root called 'images'
which should link to your images directory in html space. This is used for
image uploads; I don't think it will make a difference to the [image] tag.

Jonathan.