Page 1 of 1
Image Id
Posted:
Thu Dec 08, 2011 12:30 pm
by queenofangels
Question: If you give an image an id: ex: id='sb2018' Is there a way to put that id into a variable when the page loads???
Re: Image Id
Posted:
Thu Dec 08, 2011 1:43 pm
by Jim
Have you tried adding it to the "Other attributes:" field for the image on Images > Edit Images screen?
Re: Image Id
Posted:
Thu Dec 08, 2011 2:13 pm
by queenofangels
Hi Jim,
Yes, that's where it is. What I'm looking to do is to capture the id into a variable and use the variable else where on the page. My products with the image are being displayed by the congruence product template.
Re: Image Id
Posted:
Thu Dec 08, 2011 3:01 pm
by Jim
You will probably have to use one of the extra fields of the product for the image id, unless you know of a way to parse the attributes of the image in javascript and extract it from there.
Would it be possible to use the image name itself as the image id? Then you could use the template tag [--image product.graphic --] to get the image name and assign that to the imageid.
Re: Image Id
Posted:
Thu Dec 08, 2011 3:05 pm
by queenofangels
That might work: I'll see what I can do with it. I'll let you know what I come up with.
Thanks