calling a function with arguments?
I want to call a function I have made, with arguments. 1) is there any way to call it direct, complete with module name? It would mean getting Zope to import that module. 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? --- Julian Morrison Programmer (Zereau Ltd)
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
participants (2)
-
julian@zereau.net -
Pavlos Christoforou