Re(2): [Zope] passing parameters to DTML Methods/Documents

Tom Cameron tom@cameron.to
Wed, 6 Jun 2001 13:51:53 +1000


Thanks for the reply, but this still does not work.

I am calling a method in another folder and I want that method to access the
contents of the folder it is in.

None of these options seem to work for me.

See my other reply for more detail.

Thanks Tom

=> -----Original Message-----
=> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of David
=> McCuskey
=> Sent: Wednesday, 6 June 2001 12:42 PM
=> To: tom@cameron.to; Tommy Johnson; Zope Mailing List; Chris Ryland
=> Subject: Re(2): [Zope] passing parameters to DTML Methods/Documents
=>
=>
=>
=> There was a discussion in January about this on the Zope-Dev list.
=> search for: "Passing arguments to DTML methods"
=>
=> and back in 2000 on the Zope list:
=> search for "How to pass values to a DTML method"
=>
=> there are searchable lists at:
=> http://zope.nipltd.com/
=>
=> The short of it is:
=>
=> """ copied from one of the messages
=>
=> try something like:
=>
=> <dtml-var "method_name(_.None, _, param=value)">
=>
=> or:
=>
=> <dtml-var "method_name(_.None, _, arg1=value1, arg2=value2)">
=>
=> for a longer expose see the faq:
=> http://zdp.zope.org/projects/zfaq/faq/DTML/955111628
=> """
=>
=>
=> Is this what you guys are looking for?
=>
=> david
=>
=>
=> On 6/6/01, Tom enlightened me with:
=>
=> >I find that this works.....
=> > <dtml-var "methodname(param='value')">
=> >
=> >But My question is.. How do I use multiple namespaces(I think
=> that is how
=> >you say it)?
=> >
=> >When I pass a parameter to a method like this:-
=> > <dtml-var "methodname(param='value')">
=> >I find that methodname nolonger has access to the full
=> namespace, only those
=> >params passed to it. How do I continue to access all the other
=> variables?
=> >
=> >Tom
=> >
=> >=> -----Original Message-----
=> >=> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On
=> Behalf Of Tommy
=> >=> Johnson
=> >=> Sent: Wednesday, 6 June 2001 4:17 AM
=> >=> To: Zope List
=> >=> Subject: RE: [Zope] passing parameters to DTML Methods/Documents
=> >=>
=> >=>
=> >=> I don't believe there is any way to pass parameters from
=> code to a DTML
=> >=> method or Document. I wanted to do this also.
=> >=>
=> >=> You can put in a hidden field within a form to pass the
=> value. Or you can
=> >=> just append a querystring to the url of the document/method you
=> >=> are trying
=> >=> to access.
=> >=>
=> >=> Boy, how would I love to see things different.
=> >=>
=> >=> Tommy
=> >=>
=> >=> > -----Original Message-----
=> >=> > From: zope-admin@zope.org [mailto:zope-admin@zope.org]On
=> >=> Behalf Of Chris
=> >=> > Ryland
=> >=> > Sent: Monday, June 04, 2001 7:24 PM
=> >=> > To: zope@zope.org
=> >=> > Subject: [Zope] passing parameters to DTML Methods/Documents
=> >=> >
=> >=> >
=> >=> > There's no official way to pass parameters from DTML code
=> to other DTML
=> >=> > Methods or Documents, is there? I guess one can always do
=> a <dtml-var
=> >=> > expr="REQUEST.set('param', 'value')">, and use <dtml-var
=> param> in the
=> >=> > callee, but that seems kludgey.
=> >=> > --
=> >=> > Cheers!
=> >=> > Chris Ryland
=>
=> --
=> David McCuskey
=> david.mccuskey@bigfoot.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 )
=>