source: products/quintagroup.plonegooglesitemaps/branches/sitemap_date/quintagroup/plonegooglesitemaps/browser/mobilesitemapview.py @ 3506

Last change on this file since 3506 was 3506, checked in by potar, 12 years ago

fixed pep8

  • Property svn:eol-style set to native
File size: 780 bytes
Line 
1from DateTime import DateTime
2from quintagroup.plonegooglesitemaps.browser.commonview \
3    import CommonSitemapView, implements, ISitemapView
4
5MOBILE_INTERFACES = ['quintagroup.mobileextender.interfaces.IMobile', ]
6
7
8class 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.