Re: [SMARTY] $smarty.const
| From: | Monte Ohrt | Date: | Wed, 05 Feb 2003 23:23:38 +0000 |
| Subject: | Re: [SMARTY] $smarty.const | ||
| References: | 1 | Groups: | php.smarty.dev php.smarty.general |
| Request: | Send a blank email to php-smarty-dev+get-666@lists.php.net to get a copy of this message | ||
(CVS) undefined constants are now treated as null, so
{$smarty.foo.BLAH|default:"none"} will work fine.
Monte
On Wed, 2003-02-05 at 16:47, Ferdinand Beyer wrote:
> IMO Smarty should save the return value of get_defined_constants()
> in an array and let $smarty.const.* reference to that array:
>
> $smarty.const.xyz -> $this->_constants['xyz']
>
> By doing this it would be possible to check whether a constant exists,
> eg.
>
> {$smarty.const.FOOBAR|default:'...'}
>
> --
> Ferdinand Beyer
> <fbeyer@clickhand.de>
--
Monte Ohrt <monte@ispi.net>