18 Jul
2001
18 Jul
'01
7:18 p.m.
Benoit DOMINIAK writes:
Is there a way to get the id of an object's parent (container) ? I've tryed : <dtml-with "_.getitem(object)"> <dtml-var "PARENTS[0].getId()"> </dtml-with>
but I always get the id of the ancestor of the published object. Just like the Zope book said !! An External Method (!):
def getContainer(object): try: return object.aq_inner.aq_parent except AttributeError: return None Dieter