|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
SGBoise Smarty Rookie
Joined: 28 Mar 2008 Posts: 27 Location: GamePacks.org
|
Posted: Sat May 31, 2008 11:31 pm Post subject: Loading Config variable value from regular variable. |
|
|
I'm trying to pass variables to load from config file.
I have my language in config files. I have one config file for each language.
Code: | _CatetogyHome = "Home"
_CatetogyVideos = "Videos"
_CatetogyGames = "Games" |
My smarty code:
Code: | {foreach from=$categories key=id item=category}
<a href="/index.html">{$category->name}</a></li>
{/foreach} |
I want to pass an array of strings which will have _CatetogyHome, _CatetogyVideos, _CatetogyGames, etc. Instead of displaying _CatetogyHome I want it to display the value of the config variable.
Is this possible?
Thanks _________________ GamePacks.org - Products for the Arcade/Media Community
Video Script - The ultimate media site script
AutoVideoScript.com - Run your own youtube sharing site |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat May 31, 2008 11:51 pm Post subject: |
|
|
Code: | {foreach from=$categories key=id item=category}
<a href="/index.html">{$smarty.config.$category}</a></li>
{/foreach} |
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|