[Zope-CMF] parent id

Ausum Studio ausum_studio@hotmail.com
Wed, 19 Mar 2003 20:32:49 -0500


id = 'afearlessfroggiesfile'
parent_id = getattr(context, id).aq_parent.getId()


Ausum


----- Original Message ----- 
From: "Fearless Froggie" <fearless_froggie@yahoo.com>
To: <zope-cmf@zope.org>
Sent: Wednesday, March 19, 2003 8:05 PM
Subject: [Zope-CMF] parent id


> Hi,
> 
> Would anybody know how to get the id of the parent of
> an object given the id of the child? IE, if I have the
> id of a file, how would I get the id of the folder
> it's in? 
> 
> No problem in finding what files are in a given
> folder, going the other way is giving me some grief :)
> 
> Thanks, Rita.
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
> 
> See http://collector.zope.org/CMF for bug reports and feature requests
>