7 Jun 02:57
METAL with TAL inside
Hi, In the effort of creating Maypole::View::Petal, I'm breaking my head over a transliteration of the orginal template toolkit templates to Petal. 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 gives <span tal:repeat="col classmetadata/colums" tal:omit-tag="string:1"> <td tal:condition="false: equal:col id"> <a tal:attr="href item/url" tal:content="item/url"></a> </td> ... and so on as the output to the browser.(Continue reading)
> 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">
>
RSS Feed