Last change
on this file since 804 was
1,
checked in by myroslav, 19 years ago
|
Building directory structure
|
-
Property svn:eol-style set to
native
|
File size:
407 bytes
|
Rev | Line | |
---|
[1] | 1 | from Products.CMFCore.utils import getToolByName |
---|
| 2 | |
---|
| 3 | def 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.