Changeset 533


Ignore:
Timestamp:
07/28/06 18:16:13 (13 years ago)
Author:
tarmo
Message:

Enabled featured content in all sections.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SectionFolder.py

    r528 r533  
    1717# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
    1818 
    19 from config import PROJECTNAME, SHOW_METADATA_FIELDS, TEMPLATES, to_unicode, MIMETYPE_WHITELIST, CONTENT_TYPES, MATERIAL_TYPES 
     19from config import PROJECTNAME, SHOW_METADATA_FIELDS, TEMPLATES, to_unicode, MIMETYPE_WHITELIST, CONTENT_TYPES, FEATURED_TYPES 
    2020from Products.Archetypes.public import * 
    2121from Products.ATContentTypes.content.folder import ATFolder, ATFolderSchema 
     
    145145    def getSamples(self, search_results): 
    146146        """ Pick three random objects from search results that have non-default images to display in folders front pages. """ 
    147         pic_results = [x for x in search_results if x.meta_type in MATERIAL_TYPES and x.getHasCoverImage and x.review_state=='public' and x.Title] 
     147        pic_results = [x for x in search_results if x.meta_type in FEATURED_TYPES and x.getHasCoverImage and x.review_state=='public' and x.Title] 
    148148        n=min(3,len(pic_results)) 
    149149        samples=sample(pic_results,n) 
  • trunk/config.py

    r530 r533  
    4141REMOTE_SERVERS = ["http://lemill.net"]  
    4242 
    43 CONTENT_TYPES = ('Piece', 'PresentationMaterial', 'MultimediaMaterial',) 
    4443MATERIAL_TYPES = ('PresentationMaterial', 'MultimediaMaterial',) 
     44CONTENT_TYPES = ('Piece',) + MATERIAL_TYPES 
    4545ACTIVITY_TYPES = ('Activity',) 
    4646TOOLS_TYPES = ('Tool',) 
    47 COMMUNITY_TYPES = ('Story',) 
     47COMMUNITY_MAIN_TYPES = ('GroupBlog','MemberFolder',) 
     48COMMUNITY_TYPES = ('Story','BlogPost',) + COMMUNITY_MAIN_TYPES 
     49FEATURED_TYPES = MATERIAL_TYPES + ACTIVITY_TYPES + TOOLS_TYPES + COMMUNITY_MAIN_TYPES 
    4850ALL_CONTENT_TYPES = CONTENT_TYPES + ACTIVITY_TYPES + TOOLS_TYPES + COMMUNITY_TYPES 
    49 SEARCHABLE_TYPES = ALL_CONTENT_TYPES + ('BlogPost','GroupBlog','MemberFolder') 
    50  
     51SEARCHABLE_TYPES = ALL_CONTENT_TYPES 
    5152 
    5253# Skin variations. The first one will be the defaul 
Note: See TracChangeset for help on using the changeset viewer.