[Zope] Accessing DTML's this() from PythonScript

Casey Duncan cduncan@kaivo.com
Tue, 03 Apr 2001 14:40:25 -0600


J=E9r=F4me Loisel wrote:
>=20
> Hi!
>=20
> My site has an admin menu. That was originally a DTML Method which had =
become
> long, complex and hard to maintain. So I re-wrote it as a Python Script=
.  But
> I now have an additional problem.
>=20
> When my DTML Method is called from /folder/document.html/method, this()
> refers to the document. But in PythonScript, context and context.this()=
 refer
> to folder/ instead. Does anyone know how to have access to the document=
.html
> object instead?
>=20
> Thanks in advance. I can supply sample code if I am being unclear. Chee=
rs,
>=20
> J=E9r=F4me Loisel
>=20
> --
> J=E9r=F4me Loisel, =E9tudiant et webmestre
> L=E9vinux: GNU/Linux pour la communaut=E9
> http://www.levinux.org/
>=20

Is document.html a DTML Document or method? When I try this it works
fine on DTML Documents (Context is the document), but on DTML Methods it
behaves as you describe and as I would expect since DTML Methods do not
have a namespace for themselves.

--=20
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>