[Zope] General variable use

Dieter Maurer dieter@handshake.de
Fri, 22 Jun 2001 22:34:06 +0200 (CEST)


miah34@msn.com writes:
 > I think you can tell what I'm trying to do here:
 > 
 > <dtml-var expr="get_your_info(name=<dtml-var expr="_.SecurityGetUser
 > ()")">
 > 
 > I haven't gotten in to much of the details of python yet, so maybe I 
 > just need to get a little further along.  The basic question is 
 > passing functions as arguments to a function.
The easiest way to pass arguments to DTML objects
(or Scripts with a bound namespace) is:

    <dtml-let name="_.SecurityGetUser().getUserName()"
              ....
    >
      <dtml-var get_your_info>
    </dtml-let>

If you do not like this syntax, you can use for DTML objects (!):

   <dtml-var "get_your_info(_.None,_,name=_.SecurityGetUser().getUserName()">

More info

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




Dieter