[Zope-CMF] Re: [dev] more add menu changes

yuppie y.2008 at wcm-solutions.de
Thu Aug 7 13:04:30 EDT 2008

Hi Martin!

Martin Aspeli wrote:
> yuppie-4 wrote:
>> Some parts are still missing:
>> - add a traverser that allows to use pretty URLs and better portal type 
>> handling for add views (not part of this proposal)
>> - don't show newstyle types in folder_factories
>> - show add actions in the CMFDefault skin
>> Proposal 1: allowedContentTypes
>> -------------------------------
>> This PortalFolder method is used by folder_factories and by 
>> folder_contents to decide if the 'New...' button is added. I propose to 
>> add a new skip_add_views argument to allowedContentTypes. If true, 
>> newstyle types are skipped.
> Please let this default to False.


> I wonder if it's better to have a separate
> method that does the skipping. allowedContentTypes may be used by other
> things already. Plone uses it in a few places, for example. :)

I have no strong opinion about this. What would be a good name for a 
separate method?

> I don't suppose there's a way to make all FTI's expose actions, and just
> construct an appropriate fallback URL (e.g. createObject or whatever) if no
> add view has been specified? That'd mean folder_factories could just loop
> through the actions.

Not sure I understand what you propose. folder_factories is a form that 
allows to specify type and ID. I don't think we should ask for the ID 
*before* showing the add view. And if we have no add view, we need 
folder_factories' ID input field.

But this might work: If we also implement the traverser, the traverser 
could return a default add view that just asks for the ID. In that case 
we could use actions for newstyle and oldstyle types.

That solution would change the add procedure for oldstyle types, but 
maybe that's better than listing newstyle and oldstyle types in two 
different places.

Any opinions?



More information about the Zope-CMF mailing list