Re: [SMARTY] string parsing in a template
| From: | M Mohr | Date: | Wed, 12 Feb 2003 21:27:06 +0000 |
| Subject: | Re: [SMARTY] string parsing in a template | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7700@lists.php.net to get a copy of this message | ||
Hello,
On Wed, Feb 12, 2003 at 11:27:23PM +0200, gawan wrote:
> Hi
>
> I haven array of objects from a database query.
> One of the fields is a date field but not using a
> date type, but simply a strin like 20030212.
>
> What tools do I have in Smarty to parse this
> to display 12.02.2003?
>
> Would this be a place to use the new
> object feature? Something like
> {$current->parsedate($date)} would be great.
>
> I just don't know how to start with this?
no need for any method-calls. use an output-modifier:
http://smarty.php.net/manual/en/plugins.modifiers.php
regards
messju