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

yuppie y.2008 at wcm-solutions.de
Thu Aug 7 06:26:26 EDT 2008


Hi!


We now have to support two ways to add content:


1.) oldstyle (no add view specified)
------------------------------------

The addable types are listed in folder_factories. After specifying type 
and ID the object is added. constructContent redirects to the immediate 
view.


2.) newstyle (add view is specified)
------------------------------------

The addable types are listed as actions. These actions should show up in 
a menu. The add action points to a type specific add form. After 
completion of the form the object is added. The add form redirects to 
the immediate view.

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.


Proposal 2: main_template
-------------------------

CMFDefault menus are implemented in main_template. I propose to add a 
new section for 'folder/add' actions.


If there are no objections I'll make these changes on trunk.


Cheers,

	Yuppie




More information about the Zope-CMF mailing list