Last change
on this file was
1,
checked in by myroslav, 18 years ago
|
Building directory structure
|
-
Property svn:eol-style set to
native
|
File size:
709 bytes
|
Rev | Line | |
---|
[1] | 1 | from zope.interface import implements |
---|
| 2 | from Products.CMFCore.utils import getToolByName |
---|
| 3 | from Products.qSEOptimizer.interfaces import IKeywords |
---|
| 4 | |
---|
| 5 | |
---|
| 6 | class AdditionalKeywords(object): |
---|
| 7 | implements(IKeywords) |
---|
| 8 | |
---|
| 9 | def __init__(self, context): |
---|
| 10 | self.context = context |
---|
| 11 | |
---|
| 12 | def listKeywords(self): |
---|
| 13 | portal_props = getToolByName(self.context, 'portal_properties') |
---|
| 14 | seo_props = getToolByName(portal_props, 'seo_properties') |
---|
| 15 | original = set(self.context.qSEO_Keywords()) |
---|
| 16 | additional = set(seo_props.additional_keywords) |
---|
| 17 | text = set(self.context.SearchableText().split()) |
---|
| 18 | keywords = list(additional.intersection(text).union(original)) |
---|
| 19 | return ', '.join(keywords) |
---|
Note: See
TracBrowser
for help on using the repository browser.