[Zope-CMF] Re: Add forms and menus

Charlie Clark charlie at begeistert.org
Thu Jul 17 06:51:44 EDT 2008


Am 17.07.2008 um 12:41 schrieb Laurence Rowe:

> I'd be interested to hear what you are using this for (other than to  
> redirect to the default view of the newly created object).


Not a lot if the truth be told apart from the fact that sometimes you  
might want to go to the metadata form, other times to an edit form and  
others straight to a public view.

This is the code in CMFDefault.formlib.form

     def nextURL(self):
         obj = self._added_obj
         fti = obj.getTypeInfo()

         message = translate(self.status, self.context)
         if isinstance(message, unicode):
             message = message.encode(self._getBrowserCharset())
         return '%s/%s?%s' % (obj.absolute_url(), fti.immediate_view,
                              make_query(portal_status_message=message))

I hope I'm not confusing "initial" and "immediate" views!

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





More information about the Zope-CMF mailing list