Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
f7a519e2
Commit
f7a519e2
authored
Sep 30, 2002
by
Casey Duncan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add optional "relative" argument to getURL so that it can return site relative u
rls like absolute_url can
parent
d96eb230
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/python/Products/ZCatalog/CatalogBrains.py
lib/python/Products/ZCatalog/CatalogBrains.py
+2
-2
No files found.
lib/python/Products/ZCatalog/CatalogBrains.py
View file @
f7a519e2
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment