|
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 |
foxmask Smarty Rookie
Joined: 04 Feb 2004 Posts: 23 Location: Paris / France
|
Posted: Wed Feb 11, 2004 12:49 pm Post subject: Concat string and value from config file |
|
|
hi,
in my config.ini file i've define
[site]
format = wap (or imode)
then i try to use $smarty.config.format to include the correct header/footer and i'm trying to to this :
{include file="header_$smarty.config.format.tpl"}
which is absolutly not understand by Smarty
so i try to concat string "header_" ., $smart.config.format and ".tpl" and try also :
{include file={math equation="x + y + z" x="header_" y=$smarty.config.format z=".tpl"}}
but failed too
if someone have an idea...
Regards. _________________ Smarty Fan Since 2.5 |
|
Back to top |
|
foxmask Smarty Rookie
Joined: 04 Feb 2004 Posts: 23 Location: Paris / France
|
Posted: Wed Feb 11, 2004 12:52 pm Post subject: |
|
|
{include file="header_`$smarty.config.format`.tpl"}
is the solution
thx to messju _________________ Smarty Fan Since 2.5 |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
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
|