[PHPTAL] Access values in PHPTal modifiers?

2009-06-02 Thread Igor Sverkos
Hi, I am new to PHPTal. What I want: I read a UNIX timestamp from my database and want to display it in a special format (o-m-d H:i:s, date() syntax). This is how my template looks like: [...] tr tal:repeat=item items td tal:content=item/id / td tal:content=item/name /

Re: [PHPTAL] Access values in PHPTal modifiers?

2009-06-02 Thread Kornel Lesiński
On 02-06-2009 at 17:32:17 Igor Sverkos igor.sverkos+php...@googlemail.com wrote: and write a custom modifier like function phptal_tales_myDate($src, $nothrow) { $value = ??? $value = phptal_tales($src,$nothrow); $result = date('o-m-d H:i:s', $value); return '' .

[PHPTAL] Re: Access values in PHPTal modifiers?

2009-06-02 Thread Igor Sverkos
Hello, Kornel Lesiński kor...@... writes: and write a custom modifier like function phptal_tales_myDate($src, $nothrow) { $value = ??? $value = phptal_tales($src,$nothrow); $result = date('o-m-d H:i:s', $value); return '' . $result . ''; } Hmm.. doesn't work for

Re: [PHPTAL] Re: Access values in PHPTal modifiers?

2009-06-02 Thread Kornel Lesiński
On 02-06-2009 at 18:14:27 Igor Sverkos igor.sverkos+php...@googlemail.com wrote: $value = phptal_tales($src,$nothrow); $result = date('o-m-d H:i:s', $value); return '' . $result . ''; } Hmm.. doesn't work for me. After the phptal_tales() call, $value has the value: (string:31)