Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding the Product Title to Detailed Image Alt Tag

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-11-2006, 09:48 PM
 
MCM MCM is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 114
 

Default 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
__________________
Version 4.0.17/4.0.18
Reply With Quote
  #2  
Old 07-15-2006, 04:35 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Try {$product.product}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 07-15-2006, 08:21 PM
 
MCM MCM is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 114
 

Default

Brilliant! Thanks!
__________________
Version 4.0.17/4.0.18
Reply With Quote
  #4  
Old 08-13-2006, 06:32 PM
 
Scott DeToffol Scott DeToffol is offline
 

Senior Member
  
Join Date: Apr 2005
Location: Minneapolis, MN
Posts: 174
 

Default

Can someone expand on this? I don't see where what to replace with "{$product.product}" in \product_images.php
__________________
Scott DeToffol
Online Marketing and E-Commerce Consulting in Minneapolis

X-Cart Gold Version 4.1.9 for www.sundogtrading.com
X-Cart Pro Version 4.2.3 for www.heavyglare.com
Reply With Quote
  #5  
Old 08-26-2006, 05:30 PM
 
MCM MCM is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 114
 

Default 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"
__________________
Version 4.0.17/4.0.18
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:29 AM.

   

 
X-Cart forums © 2001-2020