[Zope] Traversable DTML methods
Kevin Dangoor
kid@kendermedia.com
Sun, 11 Jun 2000 19:24:59 -0400
----- Original Message -----
From: "Ian Sparks" <isparks@wmute.u-net.com>
To: "Dieter Maurer" <dieter@handshake.de>; "Kevin Dangoor"
<kid@kendermedia.com>
Cc: <zope@zope.org>
Sent: Sunday, June 11, 2000 6:05 PM
Subject: Re: [Zope] Traversable DTML methods
> Dieter is right, DTML methods can get parameters from the URL but they
don't
> do it in the same way as SQLMethods and that, to answer Kevins question,
is
> what I mean by making DTML Methods "traversable" (apologies if my
> terminology is off).
>
> I'd like to be able to pass a parameter to a "members" DTML method with a
> syntax like :
Ahh... Your terminology was correct. I was thinking more in terms of the
traversing functionality offered by PythonMethods. If it's doing nothing
more than passing parameters, that seems fine to me. I was thinking more of
getting into these ugly scenarios where you do things like:
<dtml-call "REQUEST.set('params', _.string.split('/', url_remainder))">
<dtml-if "params[0] == 'foo'">
...do something
</dtml-if>
etc.
That would get evil fast.
The one reason that may still exist for not making DTML Methods traversable
as you're suggesting would be if you want to call a DTML Method within the
acquisition context of another... something that some people may want to do
(I never have though). If a DTML Method chops off everything that follows in
the URL, then that remaining part of the URL can't be used for acquiring
other methods.
Kevin