[Zope] Objet : [Zope] Re: Arguments to DTML methods

Francois-Regis CHALAOUX Francois-Regis.CHALAOUX@sanofi-synthelabo.com
Wed, 19 Jan 2000 9:17:00 +0100


Oh yes me too, cause the 2 solutions work ;)

FR

>>> zope-admin@zope.org%internet 16/01/00 05:08:46 >>>
Errors-To: zope-admin@zope.org 
X-Mailman-Version: 1.0b8
Precedence: bulk
List-Id: Users of the Z Object Publishing Environment <zope.zope.org>
X-BeenThere: zope@zope.org 

michel pelletier <michel@digicool.com> wrote: 
<snip>
> You don't need to fake it, because all DTML objects _can_ be passed
> arguments.
> 
> <dtml-var "aMethod(aMappingObject, aClient, arg1, arg2...)">
> 
> 'aMappingObject' is a mapping containing the current 'namespace', or the
> namespace you want this method to use.  This is often '_' (the current
> DTML namespace)
> 
> 'aClient' is an object you want to provide the namespace for this
> method.  This is often '_.None' (no client object)
> 
> They rest are all keyword arguments.  This is the most common usage:
> 
> <dtml-var "aMethod(_, _.None, bob='uncle')">
> 
> Note the double quotes, they are important.
> 
> -Michel
> 
<snip>

Are MY EYES deceiving me? I've ALWAYS thought it was:

    <dtm-var "aMethod(_.None,_, uncle='bob')">

Note the variables, they are very important :)

IIRC, I'm pretty sure I got this from either you (Michel) or Kevin
Dangoor in this mailing list a long while back. Maybe its time 
somebody put this more prominently in the docs, cuz it sure gets 
asked a lot, and I think there should be one "official" way of 
doing this ;^). 

Regards,

Butch

PS. -- see http://www.egroups.com/group/zope/21150.html? for
a recent posting on this very same subject.

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com 

_______________________________________________
Zope maillist  -  Zope@zope.org 
http://lists.zope.org/mailman/listinfo/zope 
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce 
 http://lists.zope.org/mailman/listinfo/zope-dev )