[Zope] TAL DTML Method & folder question

Dylan Reinhardt zope at dylanreinhardt.com
Fri Nov 7 11:00:35 EST 2003


On Fri, 2003-11-07 at 03:13, Martin Koekenberg wrote:
> I know what is ' going wrong.
> 
> >From a Page Template in the root I linked a DTML Method in a sub folder. But
> this DTML Method is looking for DTML Documents in the root in stead of it's
> own sub folder.

I'm not sure how it makes sense to store *data* in your root and
*methods* in a subfolder.  Life is typically a whole lot easier if you
store methods higher up in the hierarchy and data at a lower level...
that way you can call a method on any subfolder below it thus:

server/path/to/subfolder/method

And the magic of Acquisition makes it *just work*.  See the Zope Book
for details:

http://zope.org/Documentation/Books/ZopeBook/2_6Edition/Acquisition.stx

So I'd encourage you to rethink your hierarchy as a first step.

But if you *really* want to do what you've described, it is possible. 
Several techniques of getting the root object are documented here:

http://www.zopelabs.com/cookbook/1003151229

HTH,

Dylan




More information about the Zope mailing list