[ZPT] Repeat variables in macros

Kevin Smith Kevin.Smith@sas.com
Wed, 19 Mar 2003 13:37:16 -0500


I was trying to use the following in a project of mine, but it didn't =
work.

-------------------------------------------------------------
<table>
<tr tal:repeat=3D"line python:['a','b','c']">
   <td metal:use-macro=3D"template/macros/foo">macro content</td>
</tr>
</table>

<metal:block metal:define-macro=3D"foo">
   <td tal:content=3D"line">line stuff</td>
</metal:block>
-------------------------------------------------------------

I expected the macro to acquire the namespace from its current =
container, but trying to access the repeat variable 'line' in the macro =
gives an error.  Is there any way to get this sort of operation to work? =


Kevin Smith
Kevin.Smith@sas.com=20