[Zope-dev] Getting all objectIds, recursively (ZODB)

2000-10-15 Thread Morten W. Petersen

Is there a method available that'll return a nested list of ids (or
something similar) of the current object?

-Morten

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Getting all objectIds, recursively (ZODB)

2000-10-15 Thread Morten W. Petersen

[Erik Enge]

| On 15 Oct 2000, Morten W. Petersen wrote:
| 
|  Is there a method available that'll return a nested list of ids (or
|  something similar) of the current object?
| 
| "current object"?  You probably mean objects?

No, the current (containing) object.
 
| Couldn't you do that with getParentNode().id?

Then I'd get the parent of the current object, wouldn't I?

An example to elaborate:

ZOPE

tmp

folder_a
folder_b

item_a

Now, if I'm in the context of tmp, I'd like to have a method that will
return this list:

['tmp',
['folder_a',[]],
['folder_b',[
'item_a',[]]
]
]

Anyhow, I got a tip to read the ZDOM.py file.. thanks. =)

-Morten


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )