Re: [SMARTY-DEV] Re: backtic syntax changed

From: Date: Mon, 07 Apr 2003 15:15:10 +0000
Subject: Re: [SMARTY-DEV] Re: backtic syntax changed
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1106@lists.php.net to get a copy of this message
I think a better way would be something like this: template -------- {config_load file="foo.conf" eval=true} foo.conf -------- var = "foo bar {$foo}" Or another method, a global value: $config_eval = true; Test if the literal string '{$' is found in each config var. If so, eval it as a template. On Sun, 2003-04-06 at 16:13, Tom Sommer wrote: > On 04 Apr 2003 17:22:07 -0600, Monte Ohrt wrote: > > > backtic syntax was changed to more closely reflect other language > > escapement syntax. Basically, the entire var is enclosed in the > > backtics, including the dollar sign. > > I got an idea to extend Smarty by using backtrics... > > if a string contains $* then it should automatically be treated > like a > smarty assigned variable > > like if I got a config/smarty var that says: > var = "this is a test, see my var $var here" > then, when used, $var will be replaced with it's assigned smarty-value > > sort of like an eval that requires vars to be surrounded by backtrics and > only works on vars > > perhaps this behavior could be toggled with > $smarty->eval_backtrics = true; > or something? > > -- > Tom Sommer, Denmark > www.tsn.dk - www.dreamcoder.dk -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.dev (#1106) next »