Zen Cart Logo
Forums / General Questions / Adding a class to an attribute image based on the attribute name?

Adding a class to an attribute image based on the attribute name?

Views: 706

Results 1 to 2 of 2
12 Sep 2013, 7:41 PM
#1
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Adding a class to an attribute image based on the attribute name?

I'm trying to figure out a way to use CSS Sprites for my attribute thumbnail images.

To do that, I believe I'll need to:

  1. create a CSS class for each attribute;
  2. Somehow tag the <img src=""> code for each attribute thumbnail with an appropriately named class

<img class="attribute_name" src="...>

Can someone point me to which template file outputs the attribute thumbnails and what I might use for code to insert that class?

Thanks,

John

12 Sep 2013, 8:43 PM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Adding a class to an attribute image based on the attribute name?

That would be done in your /includes/modules/attributes.php file.

copy that file to /includes/modules/YOUR_TEMPLATE folder