[Zope-CMF] CMFPortlets

chris chris@palefish.co.uk
Fri, 04 Oct 2002 20:35:08 +0100


> Ausum Studio wrote:
>
>Skinned topics are the way to go for many portlets made out of inbound
>content. For this reason I'd like them to be catalogable, but up to this
>moment they are not.
>  
>

Yep, I came up against this one. For that alt.wadham site I needed:
a) non-catalogued, administrator created,  multi-column portlets; and
b) catalogued, user-created,  single column portlets (like an FAQ list 
appearing in an IT department's portlet)

With the mighty CMF the former was easily cobbled together using a Topic 
skin, (rendering special subtopics called: main_column, left_column, 
lower_main_column, etc)

The latter required CMFTopics to be cataloguable and have metadata. I 
tried loads of sensible stuff to make this happen, but with increasing 
desperation, and some frantic trial and error (all in the grand 
tradition of computer 'science')  I found that the following 
hack^H^H^H^H product just works - just don't ask me why ;-)

class List(Document, Topic):
  meta_type = 'List'

  security = ClassSecurityInfo()

  security.declareProtected( TopicPermissions.ChangeTopics, 'listCriteria' )
  def listCriteria( self ):
      """
          Return a list of our criteria objects.
      """
      return [self.crit__Subject, self.crit__Type, self.crit__Creator]


Explanations and refinements gratefully received :-)

Regards,
Chris.

>----- Original Message -----
>From: "chris" <chris@mother.palefish.co.uk>
>To: <zope-cmf@zope.org>
>Sent: Friday, October 04, 2002 5:48 AM
>Subject: Re: [Zope-CMF] CMFPortlets (was Re: [Zope] Re: plone "vs." CMF was
>... uPortal??)
>
>
>  
>
>>well, uPortal it's not, but for a tiny channel product just skinning a
>>Topic does it for me; for example:
>>http://alt.wadham.ox.ac.uk
>>
>>    
>>