Commit eed7b1ac authored by Alexandre Boeglin's avatar Alexandre Boeglin

Added getLogicalPath method.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1342 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aa75179c
...@@ -723,6 +723,17 @@ class Base( CopyContainer, PortalContent, Base18, ActiveObject, ERP5PropertyMana ...@@ -723,6 +723,17 @@ class Base( CopyContainer, PortalContent, Base18, ActiveObject, ERP5PropertyMana
raise DeferredCatalogError('Could neither access uid nor generate it', context) raise DeferredCatalogError('Could neither access uid nor generate it', context)
return uid return uid
security.declareProtected(Permissions.AccessContentsInformation, 'getLogicalPath')
def getLogicalPath(self, REQUEST=None) :
"""
Returns the absolute path of an object, using titles when available
"""
pathlist = self.getPhysicalPath()
objectlist = [self.getPhysicalRoot()]
for element in pathlist[1:] :
objectlist.append(objectlist[-1][element])
return '/' + join([object.getTitle() for object in objectlist[1:]], '/')
security.declareProtected(Permissions.AccessContentsInformation, 'getPath') security.declareProtected(Permissions.AccessContentsInformation, 'getPath')
def getPath(self, REQUEST=None): def getPath(self, REQUEST=None):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment