Re: HTTP_*_VARS access
| From: | Monte Ohrt | Date: | Thu, 28 Jun 2001 16:17:27 +0000 |
| Subject: | Re: HTTP_*_VARS access | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1055@lists.php.net to get a copy of this message | ||
more ideas:
{=foo=}
prints foo, searches though env/cookie/get/post
{=get.foo=}
only prints foo if coming from get vars
{=post.foo=}
{=env.foo=}
{=cookie.foo=}
same deal. another idea, maybe {=foo.get=} would be more appropriate
than {=get.foo=}, decide what comes first?
Monte Ohrt wrote:
>
> That could be. Let's find out why. What is the pros/cons of each?
>
> $smarty.get.foo
>
> pros: doesn't create new syntax
> cons: kind of wordy in the template?
>
> {=foo=}
>
> pros: short easy to read & understand
> cons: yet another variable syntax
>
> Andrei Zmievski wrote:
> >
> > On Thu, 28 Jun 2001, Monte Ohrt wrote:
> > > How about a shortcut syntax:
> > >
> > > {=foo=}
> > >
> > > will print foo, searching through all the request variables in order of
> > > precedence (env,cookie,post,get or whatever the order is)
> >
> > I was under the impression that we wanted to avoid inventing new syntax.
> >
> > -Andrei
> >
> > "Everything should be made as simple
> > as possible, but not simpler."
> > -- Albert Einstein
>
> --
> Monte Ohrt <monte@ispi.net>
> http://www.ispi.net/
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/