source: products/quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/catalog.py @ 782

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 
1from zope.component import queryAdapter
2from Products.CMFPlone.CatalogTool import registerIndexableAttribute
3
4from interfaces import ICanonicalPath
5
6
7def 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
15registerIndexableAttribute('canonical_path', canonical_path)
Note: See TracBrowser for help on using the repository browser.