Thanks Douwe, your answer is very close to what I need. How can I call the DTML Method inside a DTML Document (or Method) using only dtml? THX ----- Original Message ----- From: <douwe@oberon.nl> To: "Howard Hansen" <zope@halfmagic.com>; <zope@zope.org> Sent: Monday, June 24, 2002 11:31 PM Subject: RE: [Zope] Calling a DTML Method with arguments
So I pulled out one of my old dtml methods for sending mail and tried to stick a call to it inside a dtml-in loop. And I got stuck. How do I call the DTML Method? I tried calling it as: <dtml-call "method(arg1='test')">. Didn't like that. I'm calling from a DTML Document, which has its own namespace, so I figured the method would use that, so I tried <dtml-call "method">. This at least began executing the method, though it did give a KeyError on the data from the sequence.
I'm not quite following exactly what you are doing, but in general if you want to call a dtml method from python (and from dml if you enclose the commands in double quotes), you'll have to pass the request and context objects as parameters as in
print context.standard_html_header(context,request)
Douwe