[Zope] Re: [Re: [Zope] can dtml methods take arguments ?]

Heiko Stoermer heiko@mig.net
Fri, 27 Aug 1999 20:02:08 +0200


happyrhino@usa.net wrote:

> Andreas Kostyrka <andreas@mtg.co.at> wrote:
> On 29 Aug 1999 happyrhino@usa.net wrote:
>
> >> The name "method" suggests that DTML methods should be able
> >> to take arguments much like ZSQL methods can. But for the
> >> life of me I can't find where these are added.
> >
> >Well, just use them ;)
>
> Sorry Andreas, I'm feeling a bit stupid here. You say to just
> use them so I've been trying variations without any luck.
>

If he says "just use them" he means that a DTML method can automatically
see all the variables that are available in the calling document. And thus,
by simply using the names, you get what you need.
What might confuse you is the term "parameters". It's not what you'd expect
when thinking of "formal parameters" such as 'f(int i, float g)' or similar
in C.
Just think of it as global variables that are visible in your method.

Now, enough of philosophy: to see how you can influence these variables
available to your method just see the DTML-Guide, looking out for the
section about the "let" statement or scanning it for the term
"REQUEST.set". In this case the documentation contains everything you need
(I've not been all that lucky while working with zope...) .

Heiko.

--
Heiko Stoermer
MIG Augsburg