[Zope] <dtml-if> newbie question

Dieter Maurer dieter@handshake.de
Thu, 9 Nov 2000 22:09:19 +0100 (CET)


Stephan Goeldi writes:
 > ...
 > <select name="money">
 > ....
 > </select>
 > ...
 > and the form_action method is this:
 > 
 > <dtml-in money>
"money" will come in as a string value not as a list.
It would be a list, if you added a "multiple" to your
"select".
 >    <dtml-if "1000">
This will always be true. It is constant (an expression without
variable, having always the same value independent of context).

What you mean is:

      <dtml-if "money == '1000'">

This will be true, if "money" has the value "'1000'" in the current
context.

Note the '...' around 1000! Without special Zope magic, request
variables come in as string values. The '...' indicates
a string literal.

You want to look at the upcoming Zope book to learn more
about the possible Zope magic.


Dieter