[ZPT] Re: macros and contexts
Evan Simpson
evan at 4-am.com
Fri Sep 12 12:45:56 EDT 2003
Seb Bacon wrote:
> <div tal:define="here nocall:here/foo">
> <div metal:use-macro="here/widgetlib/macros/widget_1_view">
> Widget 1 view goes here
> </div>
> </div>
>
> Which is pretty nasty, but really seems to be the only solution...?
This is perfectly valid. There's nothing magical about 'here', it's
just a pre-defined variable. On the other hand, there's nothing magical
about 'here' ;-) so you don't have to use it:
<div metal:define-macro="widget_1_view">
I am the widget 1 view on <span tal:replace="Where/getId">some
id or other</span>
</div>
<div tal:define="Where nocall:here/foo">
<div metal:use-macro="here/widgetlib/macros/widget_1_view">
Widget 1 view goes here
</div>
</div>
Cheers,
Evan @ 4-am
More information about the ZPT
mailing list