Changeset 495 for trunk/MemberFolder.py


Ignore:
Timestamp:
07/20/06 11:14:36 (13 years ago)
Author:
vahur
Message:

made a list of content types. Also made config.py accessible from python scripts and page templates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MemberFolder.py

    r490 r495  
    2727from Products.CMFCore.utils import getToolByName 
    2828from AccessControl import ClassSecurityInfo, Unauthorized 
    29 from config import PROJECTNAME, MODIFY_CONTENT, VIEW 
     29from config import PROJECTNAME, MODIFY_CONTENT, VIEW, ALL_CONTENT_TYPES 
    3030from Products.PloneLanguageTool.availablelanguages import countries 
    3131try: 
     
    516516        """ Search for content-like created by member. """ 
    517517        if not stay: 
     518            # TODO: should make use of the ALL_CONTENT_TYPES here 
    518519            return REQUEST.RESPONSE.redirect('/'.join((self.absolute_url(),'search?portal_type=Material&portal_type=Piece&portal_type=Activity&portal_type=Tool&portal_type=BlogPost&Creator=%s' % self.getId()))) 
    519520             
    520         types=['Material','Piece','Activity','Tool','BlogPost'] 
     521        types = ALL_CONTENT_TYPES + ('BlogPost',) 
    521522        pc = getToolByName(self, 'portal_catalog') 
    522523        results=pc.searchResults(Creator=self.id) 
Note: See TracChangeset for help on using the changeset viewer.