[Zope-CMF] factory_type_information questions

Kent Polk kent@goathill.org
Fri, 18 May 2001 17:43:12 -0500 (CDT)


I'm working on a folderish CMF product. I subclassed PortalFolder
and added a few of my own class methods, skins and filled out the
default Factory-based Type Information, which is all picked up fine
as long as my skins names are different from the ones used by
PortalFolder. For example, if my folder contents method is named
'bs_folder_contents' instead of 'folder_contents'. If I just specify
'folder_contents', it uses PortalFolder's folder_contents().
However, for consistency's sake I would like for my skin's names
to have the same names, when appropriate, as the PortalFolder's.
How do I tell the portal types factory system to use *my* product's
methods?

Does 'category' control this? I was looking at a Tools module for
my product next, to add/control actions, and was having some
difficulty determining the context relationships here...

Would I have to provide a new category for my product to prevent
having to use different method ids, and what benefits might there
be to providing such for when I want to add my own actions.

Basically, I'm trying to write an application that runs inside of
these customizable CMF folders - i.e. a customizable, interactive
CMF Document whose actions change based not (just) on workflow
state, but on where you are in the application via my tool's
listActions() examining the current environment.

What might be the best way to accomplish this?

I also haven't figured out how to correctly add the default_workflow
actions to this PortalFolder-subclassed item so that it can be
published when it is ready for use. I'm calling
afterCreate(self.this()._getOb(id)) at the end of the add* method
and I'm calling edit() through WorkflowAction(edit). The edit works,
and my edit method is definitely being called, but the workflow
actions don't show up. I suspect I'm not actually specifying
default_workflow correctly. How might one do this for a sub-classed
PortalFolder?

Thanks!