Changeset 2751 in products for quintagroup.plonegooglesitemaps
- Timestamp:
- Aug 13, 2010 1:12:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/newssitemapview.py
r2742 r2751 6 6 7 7 reTrailingParenthtical = re.compile("\s*\(.*\)\s*", re.S) 8 9 formatDate = lambda d:DateTime(d).strftime("%Y-%m-%d") 8 10 9 11 class NewsSitemapView(CommonSitemapView): … … 15 17 @property 16 18 def additional_maps(self): 19 17 20 return ( 18 ('publication_date', lambda x: DateTime(x.EffectiveDate).strftime("%Y-%m-%d")),19 ('keywords', lambda x: ', '.join(x.Subject)),21 ('publication_date', lambda x:x.Date and formatDate(x.Date) or ""), 22 ('keywords', lambda x:x.Subject and ', '.join(x.Subject) or ""), 20 23 ('title', lambda x:x.Title or x.getId or x.id), 21 ('name', lambda x: reTrailingParenthtical.sub("",x.Title)),24 ('name', lambda x:x.Title and reTrailingParenthtical.sub("",x.Title) or ""), 22 25 ('language', lambda x:x.Language or self.default_language()), 23 26 ('access', lambda x:x.gsm_access or ""), 24 ('genres', lambda x:x and ", ".join(x.gsm_genres) or ""),27 ('genres', lambda x:x.gsm_genres and ", ".join(x.gsm_genres) or ""), 25 28 ('stock', lambda x:x.gsm_stock or ""), 26 29 )
Note: See TracChangeset
for help on using the changeset viewer.