[Zope] Checking multiple variables existence

Justin Dunsworth justin.dunsworth at gmail.com
Tue Jan 24 16:57:58 UTC 2012


Is there any way to check if multiple variables exist in the same if
statement? Right now I am having to writing multiple nested if statements
but can be quite cumbersome... so just looking for an easier way.

Currently I'd have to write:
<dtml-if var1>
  <dtml-if var2>
    <dtml-if var3>
    <dtml-else>
    </dtml-if>
  <dtml-else>
  </dtml-if>
<dtml-else>
</dtml-if>

When it would be easier to do something like:

<dtml-if "var1 and var2 and var3">
<dtml-else>
</dtml-if>

I've tried multiple different methods to accomplish this but haven't had
any luck... so is there an easier way to check multiple variables existence
in the same check?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.zope.org/pipermail/zope/attachments/20120124/586cb786/attachment.html>


More information about the Zope mailing list