[Zope] calling a function with arguments?
Pavlos Christoforou
pavlos@gaaros.msrc.sunysb.edu
Tue, 2 Mar 1999 08:49:14 -0500 (EST)
On Tue, 2 Mar 1999 julian@zereau.net wrote:
> 2) I know I can put it in an external metod and use <!--var mymethod--> but it
> needs arguments, so I'll need to set and re-set the same DTML-namespace
> variable throughout the document, in which case, how do I alter/set DTML
> varibles from within DTML?
>
I am not sure I understand your problem. Default arguments can be given in
the definition of the function. If you need to pass a variable in an
external method you can just do
<!--# var "mymethod(myvariable)" -->
Additionally the self argument in the external method definition is
replaced by the object (or containing folder) that calls the method so you
have access to the namespace of the object through self.
Pavlos