Re: [SMARTY-DEV] Re: embedded variable handling

From: Date: Wed, 19 Feb 2003 16:34:22 +0000
Subject: Re: [SMARTY-DEV] Re: embedded variable handling
References: 1 2 3  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-746@lists.php.net to get a copy of this message
Wow, that was fast :-) "Monte Ohrt" <monte@ispi.net> schrieb im Newsbeitrag news:1045671984.28264.45.camel@lena.ispi.prv... > Sounds good to me. patched. > > $foo[index] is also allowed for section loops. > > On Wed, 2003-02-19 at 09:54, André Rabold wrote: > > I vote for the way PHP does it. > > > > String --> what will be imbedded > > "blah $foo blah" --> $foo > > "blah $foo[0] blah" --> $foo[0] > > "blah $foo[0][1] blah" --> $foo[0] (like PHP) or $foo[0][1] (to be > > discussed) > > "blah $foo.bar blah" --> only $foo (not .bar) > > > > Perhaps Smarty shoud begin supporting real concatenating of strings > > and variables so these problems will be solved for all time. > > > > André > > > > > > "Monte Ohrt" <monte@ispi.net> schrieb im Newsbeitrag > > news:1045668761.28261.31.camel@lena.ispi.prv... > > > We need to make an important decision here. > > > > > > Example of problem: > > > > > > {include file="$page.tpl"} > > > > > > Should the embedded variable be seen as $page or $page.tpl ? We are > > > having problems where people expect that the ".tpl" is not seen as part > > > of the variable. > > > > > > Smarty used to only allow $foo imbedded variable syntax, until we had a > > > request that $foo[0] should work too, so full syntax support was > > > enabled. So you can do something like this: > > > > > > "texttext $foo.bar[0][3].blah[index] texttext" > > > > > > Now, do we restrict embedded variable syntax to only $foo, or do we > > > support $foo[0][bar] but not $foo.bar, or just leave things as is and > > > support full variables? > > > > > > Monte > > > > > > > > > -- > > > Monte Ohrt <monte@ispi.net> > > > > -- > Monte Ohrt <monte@ispi.net> >

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