[Zope-CMF] Re: Add forms and menus

yuppie y.2008 at wcm-solutions.de
Tue Jul 15 07:23:49 EDT 2008


Hi Martin!


Martin Aspeli wrote:
>>>> CMF trunk uses events instead of _finishConstruction.
>>> Ah, nice. Do you think it'd be feasible to backport this, i.e. copy 
>>> the event handler somewhere in Plone so long as Plone's still using 
>>> an older version of CMF? Or does the new event handler rely on other 
>>> changes to CMF as well?
>>
>> The changes in handleContentishEvent are simple. The tricky part is to 
>> make sure notifyWorkflowCreated and indexObject aren't called twice if 
>> the types tool is used for creating content.
> 
> How did you?

Well. First I declared all existing oldstyle factories broken because 
they send the events at the wrong moment. And second, I ripped out 
_finishConstruction. I hope that's acceptable for a new feature release, 
but nothing I would introduce on a maintenance branch.

See http://svn.zope.org/?view=rev&rev=82763 and 
http://svn.zope.org/?view=rev&rev=85506 for details.

If you want to backport this to CMF 2.1, I'd try to register the new 
handler for an interface that's only used by your new content classes. 
If you don't touch the types tool, you also have to make sure that your 
new content is never created by the types tool.

>> If we don't want to use a convention, we need a new property. And if 
>> we want to be flexible enough to add the portal type name to the 
>> query, a TALES expression for the URL wouldn't be overkill.
> 
> So, a single new property that contains TALES? Called 'addview'?

Let's first see how we decide on Robert's proposal.


Cheers,

	Yuppie



More information about the Zope-CMF mailing list