Changeset 979 in products


Ignore:
Timestamp:
Sep 22, 2007 6:43:09 AM (19 years ago)
Author:
deo
Message:

Set additional keywords: use both the keywords from the content and all matching keywords.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qSEOptimizer/branches/additional-keywords/__init__.py

    r954 r979  
    2424except ImportError: 
    2525    _present = False 
    26  
    27 def propertyItems(context): 
    28     """Return a list of (id,property) tuples. 
    29     """ 
    30     return map(lambda i,c=context: (i['id'],getattr(c,i['id'],None)), 
    31                                 context._properties) 
    3226 
    3327if _present: 
     
    7266            metaTags[key] = value 
    7367 
    74         # add custom meta tags (added from qseo tab by user) for given context 
    75         property_prefix = 'qSEO_custom_' 
    76         for property, value in propertyItems(context): 
    77             idx = property.find(property_prefix) 
    78             if idx == 0 and len(property) > len(property_prefix): 
    79                 metaTags[property[len(property_prefix):]] = value 
    80  
    8168        # Set the additional matching keywords, if any 
    8269        if zope_interface_available: 
Note: See TracChangeset for help on using the changeset viewer.