Yuval Kogman | 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.

This is how it's called:

	<span metal:use-macro="macros#display_line"/>

How can I get the tal to be executed after it comes from the macro?

--

-- 
 ()  Yuval Kogman <nothingmuch@...> 0xEBD27418  perl hacker &
 /\  kung foo master: /me does a karate-chop-flip: neeyah!!!!!!!!!!!!!!


Gmane