Changeset 1475 in products for quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/views.py
- Timestamp:
- Dec 25, 2009 2:20:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/views.py
r1468 r1475 1 1 from sets import Set 2 from DateTime import DateTime 2 3 from Acquisition import aq_inner 3 4 from zope.component import queryAdapter … … 32 33 if context.hasProperty(property_name): 33 34 return context.getProperty(property_name) 34 35 35 36 if accessor: 36 37 method = getattr(context, accessor, None) … … 43 44 except AttributeError: 44 45 value = None 45 46 46 47 return value 47 48 … … 61 62 Generate Description from SEO properties 62 63 """ 63 64 64 65 return self.getSEOProperty( 'qSEO_description', accessor = 'Description') 65 66 … … 77 78 tags = self.seo_globalCustomMetaTags() 78 79 loc = self.seo_localCustomMetaTags() 79 80 80 names = [i['meta_name'] for i in tags] 81 81 add_tags = [] … … 139 139 html_comment = self.getSEOProperty( 'qSEO_html_comment' ) 140 140 return html_comment and html_comment or '' 141 141 142 142 def seo_keywords( self ): 143 143 """ … … 173 173 174 174 return value 175 175 176 176 def seo_canonical( self ): 177 177 """ … … 415 415 state = _('seoproperties_saved', default=u'Content SEO properties have been saved.') 416 416 context.plone_utils.addPortalMessage(state) 417 kwargs = {'modification_date' : DateTime()} 418 context.plone_utils.contentEdit(context, **kwargs) 417 419 return request.response.redirect(self.context.absolute_url()) 418 420 context.plone_utils.addPortalMessage(state, 'error')
Note: See TracChangeset
for help on using the changeset viewer.