Forums / Templates, Stylesheets, Page Layout / how can I set an image id?

how can I set an image id?

Locked

Views: 936

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
5 Jul 2006, 1:54 PM
#1
davidinho avatar

davidinho

New Zenner

Join Date:
Oct 2005
Posts:
15
Plugin Contributions:
0

how can I set an image id?

On the product info page, I want to give the main image an id so I can do a javascript image swap from the additional images.
I'm looking in includes/templates/mytemplate/templates/tpl_modules_main_product_image.php
which is where the code for the main image is put together and it currently reads

zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT)

I have tried a variety of adding id="mainimage but to no avail.

Please help...

5 Jul 2006, 2:46 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: how can I set an image id?

davidinho:

On the product info page, I want to give the main image an id so I can do a javascript image swap from the additional images.
I'm looking in includes/templates/mytemplate/templates/tpl_modules_main_product_image.php
which is where the code for the main image is put together and it currently reads

zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT)

I have tried a variety of adding id="mainimage but to no avail.

Please help...> zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'id="mainimage"')should do it, i.e. adding the id assignment as 5th parameter enclosed by single quotes.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

5 Jul 2006, 4:43 PM
#3
davidinho avatar

davidinho

New Zenner

Join Date:
Oct 2005
Posts:
15
Plugin Contributions:
0

Re: how can I set an image id?

Thank you Kuroi
I was having the problem because I'd taken out the height and width so it was going in as the third param.