METAL with TAL inside

Yuval Kogman <lists-JLKJG/[email protected]>
Newsgroups gmane.comp.lang.perl.modules.petal
Message-ID <[email protected]>
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-JLKJG/[email protected]> 0xEBD27418  perl hacker &
 /\  kung foo master: /me does a karate-chop-flip: neeyah!!!!!!!!!!!!!!
signature.asc (application/pgp-signature, 186 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFAw72GVCwRwOvSdBgRAhP5AJ0QJ3GHabwWu0hddIRMGhew7UYKnwCfdZT0
Kz63vlzRwft3/CBE+XUB1eU=
=KEzo
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.