Last change
on this file since 714 was
626,
checked in by crchemist, 18 years ago
|
Modified tests.
|
File size:
430 bytes
|
Rev | Line | |
---|
[626] | 1 | from Products.CMFCore.utils import getToolByName |
---|
| 2 | |
---|
| 3 | class CanonicalURL(object): |
---|
| 4 | """ CanonicalURL adapter |
---|
| 5 | """ |
---|
| 6 | |
---|
| 7 | def __init__(self, context): |
---|
| 8 | """ init |
---|
| 9 | """ |
---|
| 10 | self.context = context |
---|
| 11 | |
---|
| 12 | def getCanonicalURL(self): |
---|
| 13 | """Get canonical_url property value |
---|
| 14 | """ |
---|
| 15 | portal = getToolByName(self.context, 'portal_url').getPortalObject() |
---|
| 16 | return portal.getProperty('canonical_url',None) |
---|
Note: See
TracBrowser
for help on using the repository browser.