[Zope-CMF] folder_contents was Re: [dev] two small changes

Tonico Strasser contact_tonico at yahoo.de
Wed Feb 4 10:19:13 EST 2004


Hi,

the new folder_contents_control.py relies on an action callded 
folderContents.

   target = atool.getActionInfo('folder/folderContents', context)['url']

Unfortunely a skinnedFolder and maybe a lot of custom folderish Types 
does not have this action-id.

There is a global action in portal_actions, but I sometimes don't need 
this action.

I have a custom type, a translation. It is a scriptable type information 
based on a skinned folder which behaves like a normal content object.

In folder_contents_control.py I did:

   if item.isPrincipiaFolderish and not item.Type() == 'Translation':
     item_url = atool.getActionInfo('folder/folderContents', item)['url']

instead of:

   if item.isPrincipiaFolderish:
     ...

But it's just a workaround IMO. Is there a better way to do this?

Tonico




More information about the Zope-CMF mailing list