Re: [SMARTY-DEV] $smarty.const.CONSTANT

From: Date: Fri, 28 Feb 2003 16:53:44 +0000
Subject: Re: [SMARTY-DEV] $smarty.const.CONSTANT
References: 1 2 3 4 5  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-871@lists.php.net to get a copy of this message
Monte Ohrt wrote:
actually, this is how it works currently in CVS: Smarty will ONLY allow variables with no special chars without the tickmarks. Anything else requires them.
examples:                    is interpreted as:
$foo                     <-- $foo
$foo.bar                 <-- $foo . '.bar.'
$foo.bar               <-- $foo.bar
$foo[0].bar[index].tpl <-- $foo[0].bar[index] . '.tpl'
$smarty.foo.bar          <-- $smarty . '.foo.bar'
$smarty.foo.bar        <-- $smarty.foo.bar
Hi, While I understand how it works, I have to register my dislike for this syntax. What is stopping us from making variables work similar to the way they do in PHP, with concatenation outside of the quotes and whatnot? Like "string".$smarty.foo.bar.".tpl" ? ~Paul

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