[Zope-CMF] [dev] 'add' actions and views - a proposal

yuppie y.2008 at wcm-solutions.de
Wed Sep 24 07:27:09 EDT 2008


Martin Aspeli wrote:
> yuppie wrote:
>> Martin Aspeli wrote:
>>> Wichert Akkerman wrote:
>>>> Why not a ++add++ traverser? Aren't traversed supposed to be used for
>>>> that kind of thing? Or does a view gives us something here that a
>>>> traverser doesn't?
>>> Namespace traversal adapters are similar to IPublishTraverse solutions. 
>>> The difference is that the namespace traversal adapter normally returns 
>>> something "containerish" from which traversal continues. I think it's 
>>> intended mostly as a "redirect" to a different traversal namespace, e.g. 
>>> in the way that plone.app.portlets has namespaces for portlet managers.
>> I don't think a containerish return value is characteristic for 
>> namespace adapters. For example the ++view++ traverser usually doesn't 
>> return something containerish.
>> I now implemented an ++add++ traverser in my sandbox and it seems to 
>> work fine.
> Cool. :) Let us know when it's checked in, I'd love to have a look at it!

Ok. I checked in all my local changes. AFAICS everything works fine, but 
tests are still missing.

Please note that so far only File has a full add view. All other content 
types use the fallback add view.

I still use the pattern that adapts ITypeInformation as well. Our add 
views are anyway Zope 2 specific, so I don't think requiring explicit 
Zope 2 security declarations is unacceptable. All other solutions have 
also their drawbacks.



More information about the Zope-CMF mailing list