logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Using '|' in TALES: msg#00003

Subject: Re: Using '|' in TALES

On Aug 13, 2006, at 5:00 PM, Lenga, Yair [CIB-FI] wrote:

Few questions:
- Is the '|' suppose to work with TAL ? what is the correct syntax.
- Any chance of fixing the bug ? My pages are designed by a designer - My goal with Petal is to limit his ability to impact server performance.

Sadly, Petal isn't strictly TAL. It's almost... the guys who make it have a good portion of TAL in there, and usually fix stuff they overlook when they realize it. But there There are a few things in TAL that aren't in Petal, and vice versa.

If you don't hear anything within the next few days from them regarding the bug, there are some options before you give up:

a- you can try some of the other TAL implementations in Perl. Last I checked there were 2 others on CPAN. Neither did the code caching or anything like you see in Petal (one was admittedly anti-caching). But they all were much more compliant with the spec.

        b- alter your code slightly:
                "my/data | string:nothing" => "my/F_data 'nothing'"

instead of data being a string in the hash you pass to petal, its a sub reference, that does the lookup manually, and handles the return value

The beauty of TAL is that you can just have your designer handle the templates to the TAL spec, and then use any implementation you want. I have the same TAL templates running on Petal Template::TAL, python and phptal.


// Jonathan Vanasco





<Prev in Thread] Current Thread [Next in Thread>