Changeset 2742 in products
- Timestamp:
- Aug 11, 2010 6:33:43 PM (14 years ago)
- Location:
- quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/commonview.py
r2169 r2742 2 2 from zope.interface import implements, Interface, Attribute 3 3 4 from Acquisition import aq_inner, aq_parent 4 5 from Products.Five import BrowserView 5 6 from Products.CMFCore.utils import getToolByName 6 7 7 8 from quintagroup.plonegooglesitemaps import qPloneGoogleSitemapsMessageFactory as _ 8 from utils import additionalURLs, applyOperations9 from quintagroup.plonegooglesitemaps.browser.utils import additionalURLs, applyOperations 9 10 10 11 … … 53 54 return getToolByName(self.context, 'portal_url').getPortalObject() 54 55 56 @property 57 def search_path(self): 58 return '/'.join(aq_parent(aq_inner(self.context)).getPhysicalPath()) 59 55 60 def getFilteredObjects(self): 56 61 """ Return brains -
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/mobilesitemapview.py
r1593 r2742 1 1 from DateTime import DateTime 2 from commonview import *2 from quintagroup.plonegooglesitemaps.browser.commonview import * 3 3 4 4 MOBILE_INTERFACES = ['quintagroup.mobileextender.interfaces.IMobile',] … … 15 15 16 16 def getFilteredObjects(self): 17 path = self.portal.getPhysicalPath() 18 portal_types = self.context.getPortalTypes() 19 review_states = self.context.getStates() 20 return self.portal_catalog(path = path, 21 portal_type = portal_types, 22 review_state = review_states, 23 object_provides = MOBILE_INTERFACES, 24 ) 17 return self.portal_catalog( 18 path = self.search_path, 19 portal_type = self.context.getPortalTypes(), 20 review_state = self.context.getStates(), 21 object_provides = MOBILE_INTERFACES, 22 ) -
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/newssitemapview.py
r2420 r2742 1 1 import re 2 2 from DateTime import DateTime 3 from commonview import *4 3 from zope.component import getMultiAdapter 5 4 from plone.memoize.view import memoize 5 from quintagroup.plonegooglesitemaps.browser.commonview import * 6 6 7 7 reTrailingParenthtical = re.compile("\s*\(.*\)\s*", re.S) … … 32 32 33 33 def getFilteredObjects(self): 34 path = self.portal.getPhysicalPath()35 portal_types = self.context.getPortalTypes()36 review_states = self.context.getStates()37 34 min_date = DateTime() - 3 38 res = self.portal_catalog(path = path, 39 portal_type = portal_types, 40 review_state = review_states, 41 effective = {"query": min_date, 42 "range": "min" }) 43 return res 35 return self.portal_catalog( 36 path = self.search_path, 37 portal_type = self.context.getPortalTypes(), 38 review_state = self.context.getStates(), 39 effective = {"query": min_date, 40 "range": "min" } 41 ) -
quintagroup.plonegooglesitemaps/trunk/quintagroup/plonegooglesitemaps/browser/sitemapview.py
r1593 r2742 1 1 from DateTime import DateTime 2 from commonview import * 3 2 from quintagroup.plonegooglesitemaps.browser.commonview import * 4 3 5 4 class SitemapView(CommonSitemapView): … … 14 13 15 14 def getFilteredObjects(self): 16 path = self.portal.getPhysicalPath() 17 portal_types = self.context.getPortalTypes() 18 review_states = self.context.getStates() 19 return self.portal_catalog(path = path, 20 portal_type = portal_types, 21 review_state = review_states) 15 return self.portal_catalog( 16 path = self.search_path, 17 portal_type = self.context.getPortalTypes(), 18 review_state = self.context.getStates() 19 )
Note: See TracChangeset
for help on using the changeset viewer.