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 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) phptal_path($ctx->item, 'date')

[PHPTAL] Re: Access values in PHPTal modifiers?

2009-06-02 Thread Igor Sverkos
Hello, Kornel Lesiński 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

Re: [PHPTAL] Access values in PHPTal modifiers?

2009-06-02 Thread Kornel Lesiński
On 02-06-2009 at 17:32:17 Igor Sverkos 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 '"' . $result . '"'; } -- regards, Kor

[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: [...] [...] After reading the PHPTal documentation I would change it that way