[Zope] parameter passing syntax

Dieter Maurer dieter at handshake.de
Thu Mar 10 14:07:43 EST 2005


prabuddha  ray wrote at 2005-3-10 07:09 -0000:
> ...
>the  dtml-in tag i used goes like this:
><dtml-in getDistrictUser
>(districtname=REQUEST.form.districtname)>
><dtml-var username>
></dtml-in>

Learn about the difference between the "name" attribute
and the "expr" attribute.

Maybe

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>

would make a good reading?

In short:

   '<dtml-in XXX>' is equivalent to '<dtml-in name="XXX">'
   In this case "XXX" is not interpreted as a function
   call, even when it may look like one.

   You want '<dtml-in expr="XXX">' which can also be written
   as '<dtml-in "XXX">' In this case, "XXX" is interpreted
   not as a name but as a Python expression.

   The same applied not only to "dtml-in" but to almost
   all DTML commands.

-- 
Dieter


More information about the Zope mailing list