Changeset 1720 in products
- Timestamp:
- Feb 11, 2010 8:59:29 PM (14 years ago)
- Location:
- quintagroup.seoptimizer/trunk/quintagroup/seoptimizer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/adapters.py
r1675 r1720 79 79 purl = getToolByName(self.context,'portal_url') 80 80 81 # Calculate canonical path from qSEO_canonical property 81 82 prop = aq_inner(self.context).getProperty('qSEO_canonical', None) 82 83 if prop is not None: 83 84 return prop[len(purl()):] 84 85 86 # Fallback for canonical path calculation 85 87 return '/'+'/'.join(purl.getRelativeContentPath(self.context)) -
quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/configure.zcml
r1715 r1720 60 60 /> 61 61 62 <!-- adapter63 for="Products.Archetypes.interfaces.IBaseObject"64 provides=".interfaces.ISEOCanonicalPath"65 factory=".adapters.canonicalPathAdapter"66 / -->67 68 62 <adapter 69 63 for="Products.CMFCore.interfaces.IFolderish" … … 78 72 /> 79 73 80 <adapter81 zcml:condition="installed quintagroup.canonicalpath"82 for="Products.ATContentTypes.interface.IATContentType"83 provides="quintagroup.canonicalpath.interfaces.ICanonicalPath"84 factory=".adapters.canonicalPathAdapter"85 />86 87 74 88 75 </configure> -
quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/interfaces.py
r1675 r1720 1 1 from zope.interface import Interface 2 from quintagroup.canonicalpath.interfaces import ICanonicalPath 2 3 3 4 class IMetaKeywords(Interface): … … 15 16 """ 16 17 17 class ISEOCanonicalPath(Interface): 18 """canonical_path provider interface 18 class ISEOCanonicalPath(ICanonicalPath): 19 """ Descendent of ICanonicalPath interface. 20 Designed for three goals: 21 1) calculation CANONICAL url metatag SPECIAL for Google SEO; 22 2) as more specific canonical path interface; 23 3) implementation this interface also work for ICanonicalPath too. 19 24 """ 20 21 def canonical_path():22 """Return canonical path for the object23 """
Note: See TracChangeset
for help on using the changeset viewer.