Image Id

Questions and answers about ShopSite Custom Templates

Image Id

Postby queenofangels » Thu Dec 08, 2011 12:30 pm

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??? :? :?
queenofangels
 
Posts: 78
Joined: Tue May 24, 2011 5:36 pm

Re: Image Id

Postby Jim » Thu Dec 08, 2011 1:43 pm

Have you tried adding it to the "Other attributes:" field for the image on Images > Edit Images screen?
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Image Id

Postby queenofangels » Thu Dec 08, 2011 2:13 pm

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.
queenofangels
 
Posts: 78
Joined: Tue May 24, 2011 5:36 pm

Re: Image Id

Postby Jim » Thu Dec 08, 2011 3:01 pm

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.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Image Id

Postby queenofangels » Thu Dec 08, 2011 3:05 pm

That might work: I'll see what I can do with it. I'll let you know what I come up with.

Thanks :D :D
queenofangels
 
Posts: 78
Joined: Tue May 24, 2011 5:36 pm


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 9 guests

cron