[Zope] DTML and Python aren't talking

Blandford, Simon [BSS Audio UK] Simon.Blandford@bss.co.uk
Thu, 24 May 2001 14:11:37 +0100

I am trying to add functionality to the LibraryDocument product.

I want to call a method I have added in the main Document.py file.

If I use something like

<a class="title" href="&dtml-getURL;/my_new_method" target="_blank"
><dtml-var name="title" null="(No Title)"></a>

This sends the URL of a file to the method, which the method does nothing
with. Right now it just says "hello".

It displays the return string of the method in a new page as expected.
However, if I try to call it using something like

<dtml-var expr="my_new_method()">

then I just get an error.

Error Type: NameError
Error Value: my_new_method

For anyone who knows the DocumentLibrary product, the DTML file is
document_list_item and the python file is Document.py. The class I have
added the method to is called Document.

Simon B.