Calling a method with an unusual name.
I am forced to name all my zope methods with the extension .dtml because M$ word refuses to save the files in WebDAV unless they have an extension. This creates a problem when I try to call a python expression from DTML: <dtml-var "something.dtml"> comes back with "global name something not found". How do I call documents with an extension? example: <dtml-var "phys_petoverview2.dtml()">
Matt Gregory wrote:
I am forced to name all my zope methods with the extension .dtml because M$ word refuses to save the files in WebDAV unless they have an extension. This creates a problem when I try to call a python expression from DTML: <dtml-var "something.dtml"> comes back with "global name something not found".
How do I call documents with an extension?
example: <dtml-var "phys_petoverview2.dtml()">
Using the "name" convention: <dtml-var phys_petoverview2.dtml> Or <dtml-var name="phys_petoverview2.dtml"> Or, using the "expr" convention: <dtml-var "_['phys_petoverview2.dtml']"> Or <dtml-var expr="_['phys_petoverview2.dtml']"> You have to look it up in the _ variable, since python interprets the '.' as meaning an attribute of 'something'. -Paul
participants (2)
-
Matt Gregory -
Paul Erickson