4 Jun 15:48
[Release] Petal 2.06
Hi List, Here is a release with a few bug-fixes and minor improvements: - An HTML-friendly error mode: If you set $Petal::HTML_ERRORS = 1, Petal will display the errors in the HTML rather than die(). It is mainly useful if you intend to give remote access to the templates of your application to people who do not have access to the machine or its logs. - Entity encoding is fixed on overloaded objects. (That's the bug which Bruno filed) - Metal use-macro now does not include document declarations at the top of included templates, as it should. Enjoy! Cheers, Jean-Michel.
> There is extensive use of macros in the TT code, which I guess is a good
> thing. I attempted to keep the templates pretty much 1:1 where possible,
> but I'm now stuck.
>
>
> Here is an example template:
>
> <span metal:define-macro="display_line">
> <span tal:repeat="col classmetadata/colums" tal:omit-tag="string:1">
> <td tal:condition="false: equal:col id">
> <?if name="equal:col url"?>
> <a tal:attr="href item/url" tal:content="item/url"/>
> ...
It which file do you define this macro?
> It gives
>
> <span tal:repeat="col classmetadata/colums" tal:omit-tag="string:1">
> <td tal:condition="false: equal:col id">
>
> HTML Tidy is your friend :)
xmllint even more so, because I remember to use it
RSS Feed