Changeset 313

Show
Ignore:
Timestamp:
04/06/06 12:27:12
Author:
crchemist
Message:

Reordering metaTags.items() to have primary metatags first (in specified order)
and all other following them (in arbitrary order).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qSEOptimizer/trunk/skins/qSEOptimizer/2.1.1/listMetaTags.py

    r312 r313  
    2121         ('qSEO_Distribution','distribution'), 
    2222    ] 
     23 
    2324    if exposeDCMetaTags:  
    2425        metadataList.append(('qSEO_Distribution', 'DC.distribution')) 
     26 
    2527    for accessor, key in metadataList: 
    2628        method = getattr(context, accessor, None) 
     
    4143            value = ', '.join(value) 
    4244        metaTags[key] = value 
    43     return metaTags.items() 
     45 
     46    # Reordering metaTags.items() to have primary metatags first (in specified order) 
     47    # and all other following them (in arbitrary order). 
     48    primary_metatags = ['description', 'keywords'] 
     49    return [(name,metaTags[name]) for name in primary_metatags if name in metaTags.keys()] + \ 
     50           [(name,metaTags[name]) for name in metaTags.keys()  if name not in primary_metatags] 
  • qSEOptimizer/trunk/skins/qSEOptimizer/2.1.2/listMetaTags.py

    r312 r313  
    2121         ('qSEO_Distribution','distribution'), 
    2222    ] 
     23 
    2324    if exposeDCMetaTags:  
    2425        metadataList.append(('qSEO_Distribution', 'DC.distribution')) 
     26 
    2527    for accessor, key in metadataList: 
    2628        method = getattr(context, accessor, None) 
     
    4143            value = ', '.join(value) 
    4244        metaTags[key] = value 
    43     return metaTags.items() 
     45 
     46    # Reordering metaTags.items() to have primary metatags first (in specified order) 
     47    # and all other following them (in arbitrary order). 
     48    primary_metatags = ['description', 'keywords'] 
     49    return [(name,metaTags[name]) for name in primary_metatags if name in metaTags.keys()] + \ 
     50           [(name,metaTags[name]) for name in metaTags.keys()  if name not in primary_metatags]