Re(2): [Zope] passing parameters to DTML Methods/Documents
David McCuskey
david.mccuskey@bigfoot.com
Tue, 5 Jun 2001 19:41:31 -0700
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