Changeset 1684 in products for quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/tests/testCanonicalURL.py
- Timestamp:
- Feb 10, 2010 11:27:47 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/tests/testCanonicalURL.py
r1679 r1684 1 1 import re 2 2 from zope.component import queryAdapter 3 from zope.component import provideAdapter 4 from plone.indexer.decorator import indexer 5 6 from Products.CMFCore.interfaces import IContentish 3 7 from Products.Archetypes.interfaces import IBaseContent 4 8 … … 12 16 self.qi = self.portal.portal_quickinstaller 13 17 self.qi.installProduct(PROJECT_NAME) 14 #self.portal.changeSkin('Plone Default')15 18 16 19 self.basic_auth = 'portal_manager:secret' … … 92 95 93 96 def addCanonicalPathCatalogColumn(self): 94 from Products.CMFPlone.CatalogTool import registerIndexableAttribute95 97 96 def canonical_path(obj, portal, **kwargs): 98 @indexer(IContentish) 99 def canonical_path(obj, **kwargs): 97 100 """Return canonical_path property for the object. 98 101 """ … … 102 105 return None 103 106 104 registerIndexableAttribute('canonical_path', canonical_path) 105 107 provideAdapter(canonical_path, name='canonical_path') 106 108 catalog = getToolByName(self.portal, 'portal_catalog') 107 109 catalog.addColumn(name='canonical_path')
Note: See TracChangeset
for help on using the changeset viewer.