[Zope] conditional python expresion inside ZPT

Marco Bizzarri marco.bizzarri at gmail.com
Tue Dec 5 04:44:38 EST 2006


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 <daniel.cuesta at iavante.es> 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 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 )
>
>
>


-- 
Marco Bizzarri
http://iliveinpisa.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20061205/eb2cf4a2/attachment.htm


More information about the Zope mailing list