yuppie <[EMAIL PROTECTED]> writes: > > class MyAddForm(CMFBaseAddForm): > > fields = form.Fields(IMyType) > > portal_type = 'My type' > > Here you are mixing up content type with portal type. We can't hardcode > the portal type if we want to use the add form for renamed/derived > portal types as well.
Right, sorry. We probably don't need this at all, actually, if the traverser sets it along with the factory name. > > - The base form knows to look at self.factory_name to look up the > > factory when it does the create() call. > > create() needs to know the portal type, not just the factory name. Okay, sure, but that's known at this stage too if the traverser saves it. > Above you wanted to use self.factory_name inside the form, now you set > addview.portal_type. > > We definitely have to pass the portal type to the view. If we have to > look up the factory name in publishTraverse, we might want to pass it to > the view as well. Right. Martin _______________________________________________ Zope-CMF maillist - [email protected] http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
