[Zope] Re: Arguments to DTML methods

Butch Landingin butchland@yahoo.com
Mon, 17 Jan 2000 13:39:46 -0800 (PST)


Hi Michel,

My apologies if you've read this already in the zope mailing list
but I was hoping for a response from you (maybe I shudda cc'ed
you on the original posting?) so I'm forwarding to you a posting
I made earlier to the list...


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:

   <dtml-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