Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF

[dev] newstyle content creation



First page Previous page 1 2 Next page Last page  View All Zope cmf RSS feed   Index | Next | Previous | View Threaded

charlie at begeistert

Jun 30, 2008, 8:35 AM

Post #26 of 26 (1000 views)
Re: Re: [dev] newstyle content creation [In reply to]

Am 13.05.2008 um 23:39 schrieb yuppie:

>> If a new style factory is specified in the FTI a view of that name
>> is looked up on the adding view of the container. This is from
>> plone.app.contentmenu.menu.FactoriesSubMenuItem:
>> addingview = queryMultiAdapter((addContext, self.request), name='+')
>> if addingview is not None:
>> addview = queryMultiAdapter((addingview, self.request),
>> name=fti.factory)
>> if addview is not None:
>> return '%s/+/%s' % (baseUrl, fti.factory,)
> That means view name and factory name have to be the same. The
> portal type is not passed to the view, so it has to be hardcoded
> inside the view. Not very flexible, but if factory and view are only
> used for one hardcoded portal type it works.

Any more thoughts on this? I agree with you that the hardcoded
approach above isn't nice but can't think of a nice way to square the
circle where the add forms are registered for the container and not
the new object.

Is it possible to do something with actions? Either by defining an
additional category such as "add" on the objects themselves? That
would be easy enough from the object's perspective but would conflict
with the current lookup on the folder category. This shouldn't be too
bad as this could be replaced by looking at the allowed_content_types.
But I guess this might have the same complexity and performance
problems as relying on IAdding.

Charlie Clark
Helmholtzstr. 20
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226

Zope-CMF maillist - Zope-CMF [at] lists

See http://collector.zope.org/CMF for bug reports and feature requests

First page Previous page 1 2 Next page Last page  View All Zope cmf RSS feed   Index | Next | Previous | View Threaded

Interested in having your list archived? Contact Gossamer Threads
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.