Re: [Zope] calling a method
Ulrike Ainser writes:
I have got a method 'attribute_index' in the folder 'attribute' of the = path '/sap_root/leaves/attributes' defined, that displays a tree as it is = given in the Quick Start Tutorial of Zope .=20
I'd like to call this method out of the DTML file 'index_html' in the = folder 'attribute' of the path '/sap_root/documentation/attribute'. How can I = do that?
I already tried:
***index_html*** <html> <dtml-var "sap_root.leaves.merkmale.merkmale_index()"> </html> This fails because you break the DTML namespace chain. Use:
<dtml-with "sap_root.leaves.merkmale"> <dtml-var "merkmale_index"> </dtml-with> or: <dtml-var "sap_root.leaves.merkmale.merkmale_index(_.None,_)">
and
<html> <dtml-var sap_root.leaves.merkmale.merkmale_index> </html> This fails because the first attribute of most DTML tags is interpreted as an (atomic!) object name if it is not enclosed in "...". You code looks for an object with name "sap_root.leaves.merkmale.merkmale_index". The '.' are not interpreted as the attribute access operator but are passive parts of the name.
The standard ad: more information in URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html Dieter
participants (1)
-
Dieter Maurer