Re: [SMARTY-DEV] $smarty.const.CONSTANT
| From: | Monte Ohrt | Date: | Fri, 28 Feb 2003 16:57:50 +0000 |
| Subject: | Re: [SMARTY-DEV] $smarty.const.CONSTANT | ||
| References: | 1 2 3 4 5 6 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-872@lists.php.net to get a copy of this message | ||
That is exactly the problem, look at your example. There is ambiguity of
what "." means, catentate or array index?
See this thread:
http://marc.theaimsgroup.com/?l=smarty-dev&m=104585121405535&w=2
I'm open to ideas.
Monte
On Fri, 2003-02-28 at 10:53, Paul Lockaby wrote:
> 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
--
Monte Ohrt <monte@ispi.net>