Re: [SMARTY-DEV] tokens as input to modifiers
| From: | messju mohr | Date: | Thu, 08 Jul 2004 07:57:02 +0000 |
| Subject: | Re: [SMARTY-DEV] tokens as input to modifiers | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2459@lists.php.net to get a copy of this message | ||
On Wed, Jul 07, 2004 at 03:42:08PM -0700, boots wrote:
> --- messju mohr <messju@lammfellpuschen.de> wrote:
> > On Wed, Jul 07, 2004 at 01:03:20PM -0700, boots wrote:
> > > Should tokens be allowed to be passed to modifiers? The following
> > does
> > > not seem to work:
> > >
> > > {null|foo}, {true|foo}, etc...
> > >
> > > Bug or behaviour?
> >
> > i think it's intended. "null" or "true" could be registered
> > functions
> > which makes the above valid syntax. allowing "null" and "true" as
> > constants would make it ambiguous.
>
> Fair enough. Interestingly, the behaviour is not consistent when used
> as follows:
>
> {if null|foo ...}
you are comparing apples and pears.
*nothing* in smarty is consistent with the if syntax. consider:
{if html_options} vs. {html_options} or
{if isset($foo)} vs. {isset($foo)}
> In the latter case, processing continues but in the former case, Smarty
> dies.
>
> xo boots