Parent objects of the folder in Zope/Plone Framework
To get parent object for navigation for zope navigation framework. Following script which might be helpful.
root = ('',) vRoot = context.REQUEST.VirtualRootPhysicalPath PARENTS = context.REQUEST.PARENTS PARENTS.reverse() if vRoot: root = vRoot #inside if block PARENTS = PARENTS[len(vRoot)-1:] #inside if block try: if PARENTS[-1].meta_type != 'ATFolder': return PARENTS[-3] else: return PARENTS[-2] except IndexError : return PARENTS
3rd December 2014
14th November 2009
17th December 2016