Commit f7a519e2 authored by Casey Duncan's avatar Casey Duncan

Add optional "relative" argument to getURL so that it can return site relative u

rls like absolute_url can
parent d96eb230
...@@ -29,10 +29,10 @@ class AbstractCatalogBrain(Record.Record, Acquisition.Implicit): ...@@ -29,10 +29,10 @@ class AbstractCatalogBrain(Record.Record, Acquisition.Implicit):
"""Get the physical path for this record""" """Get the physical path for this record"""
return self.aq_parent.getpath(self.data_record_id_) return self.aq_parent.getpath(self.data_record_id_)
def getURL(self): def getURL(self, relative=0):
"""Try to generate a URL for this record""" """Try to generate a URL for this record"""
try: try:
return self.REQUEST.physicalPathToURL(self.getPath()) return self.REQUEST.physicalPathToURL(self.getPath(), relative)
except: except:
return self.getPath() return self.getPath()
......
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