26 Jan
2004
26 Jan
'04
7:34 p.m.
Sune Brøndum Wøller wrote:
is it possible when using a macro to conditionally fill a slot ? In the same template, that is...
It's sort of possible, but messy: <div metal:define-macro="mymacro"> Blah, blah... <div metal:define-slot="myslot"><metal:slot define-macro="myslot"> Default contents of slot </metal:slot></div> </div> <div metal:use-macro="template/macros/mymacro"> <div metal:fill-slot="myslot" tal:define="filled some_condition"> <p tal:condition="filled"> New Contents </p> <metal:slot tal:condition="not:filled" use-macro="template/macros/myslot" /> </div> </div> Cheers, Evan @ 4-am