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

From: Date: Mon, 14 Apr 2003 14:38:50 +0000
Subject: Re: [SMARTY-DEV] Re: backtic syntax changed
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1147@lists.php.net to get a copy of this message
On Mon, 2003-04-14 at 08:53, Tom Sommer wrote: > On 14 Apr 2003 08:45:47 -0500, Monte Ohrt wrote: > > > It depends on if you want to evaluate the var as a template or as quoted > > text. The first one is more powerful and less confusing IMHO. > > You might be right, I was sort if thinking backtrics you be used like PHP > used '. and ". > > so > var1 = "hello $myvar test" > would be > var1 = "hello ". $myvar ." test" > > But you might be right, doesn't really matter that much... > > The main thing is that there is a $smart->var that toggles this behavior, > like > $smarty->eval_vars = true|false; I don't think that would be too practical. Evaluating every var would be mostly unnecessary and quite a noticable performance overhead. Typically you would want to eval a config var upon loading it, or maybe eval a particular template variable at runtime which is what {eval} is for. Monte > > which in turn evals *all* config and template vars automatically.... > > and maybe add an extra argument for assign(), but that would only be an > extra plus, to toggle the eval behavior for each assign() > > -- > Tom Sommer, Denmark > www.tsn.dk - www.dreamcoder.dk -- Monte Ohrt <monte@ispi.net>

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