Accessing properties of the folder of a document
Hello, I wonder if I did not read carefully the docs but I have not found a clue, how to access the properties like 'id', 'title' and potentially others from the folder my DTMLDocument or a self written product (in Python code). Any ideas / examples how to do that? Kind regards Andreas.
Tille, Andreas writes:
I wonder if I did not read carefully the docs but I have not found a clue, how to access the properties like 'id', 'title' and potentially others from the folder my DTMLDocument or a self written product (in Python code).
Any ideas / examples how to do that?
"object.id", "object.title", .... But, in earlier posts, I saw, you do that already... Maybe, I do not understand your question... Dieter
On Fri, 7 Dec 2001, Dieter Maurer wrote:
"object.id", "object.title", ....
But, in earlier posts, I saw, you do that already... Maybe, I do not understand your question... If I call this from a DTMLDocument I do not know the name of 'object' because I did not found a method to get the *name* of the folder the document is residing in.
Ron suggested to place a Python method in the folder the folder of question is residing in, but I'm really sure that there must be a method to find out the 'parent' of an object (as in some kind of double-linked lists or something else) to access properties/methods of the parent. Kind regards Andreas.
Tille, Andreas writes:
On Fri, 7 Dec 2001, Dieter Maurer wrote:
"object.id", "object.title", ....
But, in earlier posts, I saw, you do that already... Maybe, I do not understand your question... If I call this from a DTMLDocument I do not know the name of 'object' because I did not found a method to get the *name* of the folder the document is residing in. In a DTML Document (not Method!), you can try "aq_parent".
I expect it to work but did not try it... Dieter
On Fri, 7 Dec 2001, Dieter Maurer wrote:
In a DTML Document (not Method!), you can try "aq_parent".
I expect it to work but did not try it... Your expectations where right! Thank you very much.
Just for the record: I found it documented in Zope Developers Guide topic Acquisition. (Great documentation!) Kind regards Andreas.
participants (3)
-
Chris McDonough -
Dieter Maurer -
Tille, Andreas