X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Adding the Product Title to Detailed Image Alt Tag (https://forum.x-cart.com/showthread.php?t=23199)

MCM 07-11-2006 09:48 PM

Adding the Product Title to Detailed Image Alt Tag
 
Hi,

The images we use for our products have very basic descriptors for the alt tags, so I'd like to have the title inserted, followed by the descriptor--the inputted alt tag for the image--like this:

Title - Descriptor

I've tried ammending the alt tag in /modules/Detailed_Product_Images/product_images.tpl to:

"{$product|escape} - {$images[image].alt|escape}" but this didn't work (I got the {$product|escape} from the thumbnail image, which on the same page, does have the title as its alt tag. Can anyone help me out here?

Thanks,

Jeremy

balinor 07-15-2006 04:35 AM

Try {$product.product}

MCM 07-15-2006 08:21 PM

Brilliant! Thanks!

Scott DeToffol 08-13-2006 06:32 PM

Can someone expand on this? I don't see where what to replace with "{$product.product}" in \product_images.php

MCM 08-26-2006 05:30 PM

Re: Adding the Product Title to Detailed Image Alt Tag
 
Quote:

Originally Posted by Scott DeToffol
Can someone expand on this? I don't see where what to replace with "{$product.product}" in \product_images.php


Code:

{section name=image loop=$images}
{if $images[image].avail eq "Y"}
{if $images[image].tmbn_url}
<IMG src="{$images[image].tmbn_url}" alt="{$images[image].alt|escape}">
{else}
<IMG src="{$xcart_web_dir}/product_image.php?imageid={$images[image].imageid}" alt="{$product.product} - {$images[image].alt|escape}">
{/if}
<BR>
<BR>
{/if}
{/section}


In this case, the alt tag on the website reads "TITLE - Item's given alt tag"


All times are GMT -8. The time now is 07:43 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.