[Zope3-Users] test() in TALES in Zope3

Frank Burkhardt fbo2 at gmx.net
Wed Feb 1 03:04:36 EST 2006


Hi,

in Zope2 there's a test() method that can be used in TAL (*). Is there something
comparable in Zope3?

I know how to write such a method but how to make it available in the
namespace of TALES-"python:"-expressions? I would like to write expressions
like this:

<div tal:attributes="class python: 'foo' + test(condition == True,' bar','')" />

Is this possible?

Regards,

Frank

(*) found it here:
    http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx
    (look for 'test(' )


More information about the Zope3-users mailing list