[Zope] Re: fill-slot condition possible?
Sune Brøndum Wøller
sune at syntetisk.dk
Mon Jan 26 14:45:39 EST 2004
yes, it is a bit messy - but it works!
maybe the possiblity to calculate slot-names with
TALES, like you can with macros, or to create a
kind of fill-slot-if statement should be considered
in future revisions of METAL ?
thanks for your help,
Sune B. Wøller
>
> 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
>
>
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
More information about the Zope
mailing list