What about putting the code snippet in a python script and then calling it from ZPT?
Put it in a script like "mycondition", and then <div tal:define="x here/mycondition"> <!-- use x here --> </div> Regards Marco On 12/5/06, Daniel de la Cuesta <[EMAIL PROTECTED]> wrote:
Hello, How can I insert a conditional python expresion inside a ZPT. Example: if (my_expresion): toreturn = a else: toreturn = b return toretun Thank you! _______________________________________________ Zope maillist - Zope@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 )
-- Marco Bizzarri http://iliveinpisa.blogspot.com/
_______________________________________________ Zope maillist - Zope@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 )