[ZPT] Re: [Zope-dev] Re: [Vote] PEP308 voting began

Steve Alexander steve@cat-box.net
Thu, 06 Mar 2003 17:47:12 +0200


> (Tested with
> <div tal:replace="if:options/x then:string:yes else:string:no">)

There are an awful lot of colons in there :-)

Here's an off-the-wall idea:

   <div tal:replace="talif"
        tal:if="options/x"
        tal:true="string:yes"
        tal:false="string:no"
        >

This looks better as a tal:tag

   <tal:block
       replace="talif"
       if="options/x"
       true="string:yes"
       false="string:no"
       >

Or, if you only use this kind of thing with tal:replace, tal:content and 
tal:define.

   <tal:block
       defineif="foo options/x"
       true="string:yes"
       false="string:no"
       >

Of course, none of this helps for tal:attributes.

--
Steve Alexander