Jump to content

Composing image TITLE Attribute


Recommended Posts

You will have to edit the product.tpl file if you want to do them on the products page, the product-list.tpl file if you want them on the category pages. What I do is use the same description for the alt tag and the title tag. You could use the product name too.

Link to comment
Share on other sites

Search the tpl files for where it uses and img tag. Then copy the alt tag and paste it into the img tag. Then rename the alt tag you just pasted to title. The alt tag should look like this

alt="{$product->name|escape:'htmlall':'UTF-8'}"

Link to comment
Share on other sites

Thanks, but I’ve already done that.

I would like to include also the value from one attribute (in my site the “Unwrapped” and “Wrapped in Tulle” values for the “Tulle wrapping” attribute) and I have no idea how to do that.

Thanks,

Adrian

Link to comment
Share on other sites

Maybe I wasn’t very clear, so I am trying to explain again.

For the images of the product (in the product pages), is there any possibility to include the name of one attribute in the ALT or TITLE fields of the img tag? I’ve seen someone who included in the ALT of each image the name of the corresponding colors attribute of each image. Anyway, even I would manage to include the values of color attribute I don’t have colors among the attributes of my products.

Or, is there any possibility in Prestashop 1.5.x to include some extra text in the ALT or TITLE of each image, something different for each image?

Adrian.

Link to comment
Share on other sites

×
×
  • Create New...