Last change
on this file since 1561 was
458,
checked in by fenix, 18 years ago
|
qPloneResolveUID import
|
-
Property svn:eol-style set to
native
|
File size:
798 bytes
|
Rev | Line | |
---|
[403] | 1 | from DateTime import DateTime |
---|
| 2 | from commonview import * |
---|
| 3 | |
---|
| 4 | class NewsSitemapView(CommonSitemapView): |
---|
| 5 | """ |
---|
| 6 | Mobile Sitemap browser view |
---|
| 7 | """ |
---|
| 8 | implements(ISitemapView) |
---|
| 9 | |
---|
| 10 | additional_maps = ( |
---|
| 11 | ('publication_date', lambda x:DateTime(x.EffectiveDate).HTML4()), |
---|
| 12 | ('keywords', lambda x:', '.join(x.Subject)) |
---|
| 13 | ) |
---|
| 14 | |
---|
| 15 | def getFilteredObjects(self): |
---|
| 16 | path = self.portal.getPhysicalPath() |
---|
| 17 | portal_types = self.context.getPortalTypes() |
---|
| 18 | review_states = self.context.getStates() |
---|
| 19 | min_date = DateTime() - 3 |
---|
| 20 | res = self.portal_catalog(path = path, |
---|
| 21 | portal_type = portal_types, |
---|
| 22 | review_state = review_states, |
---|
| 23 | effective = {"query": min_date, |
---|
| 24 | "range": "min" }) |
---|
| 25 | return res |
---|
Note: See
TracBrowser
for help on using the repository browser.