[ZPT] multiple expressions in tal:condition?

Clemens Robbenhaar zpt@zope.org
Thu, 21 Nov 2002 22:08:19 +0100


 > I need to test multiple conditions in a tal:condition statement, such as this row
 > controlling rendering of a formulator form.
 > 
 > Within:
 > <span tal:repeat="repeatfield repeatform/get_fields" tal:omit-tag="">
 > neither
 >   <tr tal:condition="repeatfield/required; not:repeatfield/hidden">
 > nor
 >   <tr tal:condition="python:repeatfield.required and not repeatfield.hidden">

 ... but this should work, except if 'required' or 'hidden' is something more
complicated than a value; in the latter case the condition is always true.

 Maybe You just want to display these values for debugging, e.g.
<span tal:content="python:repeatfield.required" /> and look at what You
get. If e.g. this is actually a method, You may want to try something like
 
  "python:repeatfield.required() and ..." 

instead.