[Zope] <dtml-in>

Dieter Maurer dieter@handshake.de
Wed, 25 Sep 2002 21:21:23 +0200


=?ISO-8859-1?Q?Sz=E9kely_Csaba?= writes:
 > ...
 > The first:
 > 
 > ...
 >         <dtml-if expr="locid == locid_form">
 > ...
 > 
 > I get the <dtml-var locid_form> from a    DTML Document.
Not sure, I understand this:

 "locid_form" is a DTML Document that returns the value you want
 to compare against "locid"?

If this interpretation is true, the you must call the DTML object
(you should usually avoid DTML Document and use DTML Methods,
or even Python Scripts).
The best way is

    <dtml-if expr="locid == _.render(locid_form)">

 > The second is related to the 1'st one :
 > ...
You are on the right way. When you solved 1, your approach for
2 will work (though it could be shorted, by just putting the "selected"
in a "dtml-if" and not the complete "option" element.)


Dieter