Re: [Zope-dev] PythonMethods: Can't Slice context.REQUEST.PARENTS
The Doctor What writes:
Using context.this().id, self.this().id, m_self.this().id all get me the same things: Folder, Zope, and my method. None give me the DTML Document foo_html. If it is indeed a DTML Document, then "this()" should reference this document. If it is a DTML Method, then "this()" will reference the methods 'client', usually the methods parent.
.... Did you mean to do a this().id? That doesn't work at all, it gives me a Name Error. No. I am not yet familiar with PythonMethods and what binding they define automatically. Obviously, you have "context", "m_self" and "self". My older PythonMethods installed seem to support only "self", but I am not sure.
I would expect, that "context.this()" has the highest chance of success, maybe "self.this()". Note, that "foo_html" must be a DTML Document not a DTML Method!
There *must* be a way to do this. There is none for DTML Methods (other than modifying the code).
Dieter
I got a reply from someone working on it. It seems the answer is that it doesn't exist yet, pending a change in ZOPE itself. So I have to pass it in: <dtml-var expr="breadcrumbs(this())"> Not a big deal, but annoying. I'll make the source available as soon as I coble together a view-source method. :) Ciao! -- "Well, given that the universe is infinite, and that God is infinite, and that God created the universe, (pause) would you like a piece of toast?" --Talkie Toaster (Red Dwarf episode: Dimension Jump) The Doctor What: A Holtje Production http://docwhat.gerf.org/ docwhat@gerf.org KF6VNC
participants (2)
-
Dieter Maurer -
The Doctor What