Last change
on this file was
784,
checked in by crchemist, 17 years ago
|
Added translation of portal_status_message for all plones.
|
-
Property svn:eol-style set to
native
|
File size:
933 bytes
|
Line | |
---|
1 | from zope.interface import implements |
---|
2 | |
---|
3 | from quills.core.interfaces import IWeblogEntry |
---|
4 | from quills.core.interfaces.enabled import IPossibleWeblogEntry |
---|
5 | from quills.app.utilities import getArchivePathFor, getArchivePathFor |
---|
6 | from quintagroup.canonicalpath.interfaces import ICanonicalPath |
---|
7 | |
---|
8 | from Products.CMFCore.utils import getToolByName |
---|
9 | |
---|
10 | class quillsCanonicalPathAdapter(object): |
---|
11 | """Adapts quills entry content to canonical path. |
---|
12 | """ |
---|
13 | implements(ICanonicalPath) |
---|
14 | |
---|
15 | def __init__(self, context): |
---|
16 | self.context = context |
---|
17 | |
---|
18 | def canonical_path(self): |
---|
19 | purl = getToolByName(self.context,'portal_url') |
---|
20 | entry = IWeblogEntry(self.context).__of__(self.context.aq_inner.aq_parent) |
---|
21 | weblog_content = entry.getWeblogContentObject() |
---|
22 | weblog_path = '/'+'/'.join(purl.getRelativeContentPath(weblog_content)) |
---|
23 | |
---|
24 | return '%s/%s' % (weblog_path,'/'.join(getArchivePathFor(entry, weblog_content))) |
---|
Note: See
TracBrowser
for help on using the repository browser.