[ZPT] multiple expressions in tal:condition?

Jeff Kowalczyk jtk@yahoo.com
Thu, 21 Nov 2002 15:30:18 -0500


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">
nor
  <tr tal:condition="python:repeatform.repeatfield.required and not
repeatform.repeatfield.hidden">
work

is there a way to do this? I was able to next the extra conditional in a contained span,
but then you still get the tr when you don't want it. I can use tal:define for two local
variables, but I wanted to check if there was a direct syntax for {and|or|not} with
non-python expressions in tal:condition first.

Thanks.