[Zope-CMF] Getting to grips with CMF
Tres Seaver
tseaver@digicool.com
Tue, 10 Apr 2001 08:04:53 -0400
Ivan Cornell wrote:
> After getting to know zope (& python) for the last few months,
> using zclasses to build the core of my site sucessfully, I'm
> having another go at trying to grok CMF. I'm finding it difficult
> to figure out what is going on in the code & where I should hook
> in my modifications. After several nights of glazed over eyes,
> I wonder if anyone can help me with what I want...
>
> Changing the workflow:
> Members documents are always visible on their pages (No privacy
> here!), but not searchable by default and if they 'publish',
> editors take a copy of the document, edit it & place that into
> the main site area.
You will need to replace the 'portal_workflow' tool with an instance
of a class which both implements the 'portal_workflow' interface, and
imposes your required policy. The interface file is
'CMFCore/interfaces/portal_workflow.py'. The interfaces explicitly
account for the fact that the object's location and permissions may
change during a transition.
> Discussions:
> I want members to be able to comment on my non-cmf aware pages
> (zclass instances).
You will need to create "type objects" for your non-CMF object
types (see the "PortalPoll" tutorial on the dogbowl). These type
objects let the CMF machinery know what to do with the object,
including which actions to display: you would create at least a
"Reply" action, similar to theone which Docuements, et aliae have,
and a "View" action.
> Also I want the discussions to be flat, ie you can't comment
> on comments - how do you turn that off?
You will likely need to reimplement the 'portal_discussions' tool
to change this policy.
> ZCatalog:
> My existing zclasses are catalogaware - can they share the
> catalog with cmf for unified searching?
CatalogAware presumes that the "magic name" for the catalog object
is 'Catalog'; the CMF names its catalog 'portal_catalog'. You
would need to make it possible for the CatalogAware objects to
find the right object (perhaps a PythonScript, 'Catalog', whose
body was simply, 'return context.portal_catalog'?)
In addition, the "unified searching" will only be practical if your
non-CMF objects implement the same indexable attributes as the CMF
(mostly the DublinCore interfaces).
Tres.
--
===============================================================
Tres Seaver tseaver@digicool.com
Digital Creations "Zope Dealers" http://www.zope.org