Last change
on this file since 3663 was
3510,
checked in by potar, 12 years ago
|
Merged sitemap_date branch into trunk
|
-
Property svn:eol-style set to
native
|
File size:
780 bytes
|
Line | |
---|
1 | from DateTime import DateTime |
---|
2 | from quintagroup.plonegooglesitemaps.browser.commonview \ |
---|
3 | import CommonSitemapView, implements, ISitemapView |
---|
4 | |
---|
5 | MOBILE_INTERFACES = ['quintagroup.mobileextender.interfaces.IMobile', ] |
---|
6 | |
---|
7 | |
---|
8 | class MobileSitemapView(CommonSitemapView): |
---|
9 | """ |
---|
10 | Mobile Sitemap browser view |
---|
11 | """ |
---|
12 | implements(ISitemapView) |
---|
13 | |
---|
14 | additional_maps = ( |
---|
15 | ('modification_date', |
---|
16 | lambda x: x.sitemap_date or DateTime(x.ModificationDate).HTML4()), |
---|
17 | ) |
---|
18 | |
---|
19 | def getFilteredObjects(self): |
---|
20 | return self.portal_catalog( |
---|
21 | path=self.search_path, |
---|
22 | portal_type=self.context.getPortalTypes(), |
---|
23 | review_state=self.context.getStates(), |
---|
24 | object_provides=MOBILE_INTERFACES, |
---|
25 | is_default_page=False, |
---|
26 | ) |
---|
Note: See
TracBrowser
for help on using the repository browser.