Re: [SMARTY] Variable modifiers - support OO?
| From: | messju mohr | Date: | Wed, 02 Apr 2003 22:45:55 +0000 |
| Subject: | Re: [SMARTY] Variable modifiers - support OO? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9046@lists.php.net to get a copy of this message | ||
On Wed, Apr 02, 2003 at 05:28:31PM -0500, Andrew S. Nagy wrote:
> Monte, do you think that allowing the variable modifier functions to support
> methods is out of the scope of Smarty?
>
> I would like to be able to do the following:
>
> {foreach from=$objList item=obj}
> {$obj->getTimestamp()|date_format:%r}
> {/foreach}
>
> Am I trying to take Smarty too far again, or do you think this is a
> plausible idea?
no you don't. just put quotes around %r, and the syntax proposed by
you works just fine :-)