[Petal] METAL with TAL inside

Yuval Kogman lists at woobling.org
Mon Jun 7 01:57:42 BST 2004


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 at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me does a karate-chop-flip: neeyah!!!!!!!!!!!!!!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.webarch.co.uk/pipermail/petal/attachments/20040607/42e59df7/attachment.bin


More information about the Petal mailing list