![]() |
Re: Dynamic Image Directory Reference from within Langauge Variable
Well the language variables are pulled from the DB, and placed in the template, smarty variables contained inside them are not processed normally.
But using |substitute makes it look for that {{tag}} that you specify, and then it can evaluate the variable and include it in the string. Glad you got it sorted. |
Re: Dynamic Image Directory Reference from within Langauge Variable
Alternatively and possibly simpler solution would be:
Language variable would contain this exactly as Steve suggested: Code:
<a href="home.php"><img src="{$AltImagesDir}/custom/mypicture.jpg" /></a> Then call the language variable in your tpl file thusly: Code:
{eval var=$lng.languagevariablename} Essentially you can treat a variable as a template and embed entire smarty constructs within then using eval function outputs the variable contents. Quote:
|
Re: Dynamic Image Directory Reference from within Langauge Variable
Quote:
|
Re: Dynamic Image Directory Reference from within Langauge Variable
Awesome hooter, I will try that as well. Does it hurt anything to have the {eval var=$lng.languagevariablename} if there is no {$something} in the langauge variable? I'm gussing not.
What a world of possibilities opens up! |
Re: Dynamic Image Directory Reference from within Langauge Variable
Quote:
|
All times are GMT -8. The time now is 10:00 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.