source: products/qPingTool/trunk/util.py @ 2111

Last change on this file since 2111 was 1, checked in by myroslav, 15 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 407 bytes
Line 
1from Products.CMFCore.utils import getToolByName
2
3def getCanonicalURL(context):
4    """ Uniform method for get portal canonical url."""
5    p_url = getToolByName(context, 'portal_url')
6    canonical_url = ""
7    try:
8        from adapter import ICanonicalURL
9        canonical_url = ICanonicalURL(p_url).getCanonicalURL()
10    except:
11        canonical_url = p_url.getCanonicalURL()
12
13    return canonical_url
Note: See TracBrowser for help on using the repository browser.