Last change
on this file since 782 was
782,
checked in by crchemist, 17 years ago
|
Added translation for portal_status_message.
|
-
Property svn:eol-style set to
native
|
File size:
441 bytes
|
Line | |
---|
1 | from zope.component import queryAdapter |
---|
2 | from Products.CMFPlone.CatalogTool import registerIndexableAttribute |
---|
3 | |
---|
4 | from interfaces import ICanonicalPath |
---|
5 | |
---|
6 | |
---|
7 | def canonical_path(obj, portal, **kwargs): |
---|
8 | """Return canonical_path property for the object. |
---|
9 | """ |
---|
10 | cpath = queryAdapter(obj, interface=ICanonicalPath) |
---|
11 | if cpath: |
---|
12 | return cpath.canonical_path() |
---|
13 | return None |
---|
14 | |
---|
15 | registerIndexableAttribute('canonical_path', canonical_path) |
---|
Note: See
TracBrowser
for help on using the repository browser.