From: Dieter Maurer *EXTERN* [mailto:dieter@handshake.de]
And how do I call a DTML-variable (object?) defined with <dtml-let var=...> from my script? context.var, container.var, script.var don't work. You bind the "namespace". This binding is there for precisely this aim....
From the Zope Book (Chapter 8, binding variables):
Namespace ... If your script is calles from a DTML Method, and you have chosen a name for this binding, then the named variable contains the DTML namespace ...
... these bindings are listed in comments at the top of your script files:
... ##bind namespace= ...
You can change your script's bindings by changing these comments...
My script: ... ##bind namespace=namespace ... zone = namespace.zone return zone It is called from a DTML-method where the tag <dtml-var zone> is rendered correctly: ... <dtml-var get_status_a> ... Error: Zope Error Zope has encountered an error while publishing this resource. Error Type: AttributeError Error Value: zone