View Single Post
  #9  
Old 12-20-2012, 10:30 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Dynamic Image Directory Reference from within Langauge Variable

Quote:
Originally Posted by tartaglia
Hi all, (XC 4.5.4)

Can anyone explain to me why the following does not work in a language variable:

<a href="home.php"><img src="{{AltImagesDir}}/custom/mypicture.jpg" /></a>

It seems it cannot use the {{AltImagesDir}} to determine the path to the picture.

I also tried inserting a "$", {{$AltImagesDir}} which did not work either.

I saw something similar in another default language variable, but since I don't know whether the lng variable I found with similar value is being used anywhere I don't know if it actually works either.

I can get the following to work, but want to understand why the former doesn't:

<a href="home.php"><img src="../images/custom/mypicture.jpg" /></a>

Why do you have the smarty variable in double {{}}? It has to be single {}.

<a href="home.php"><img src="{$AltImagesDir}/custom/mypicture.jpg" /></a>
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote