[Zope-CMF] Actions and navigation

Geoff Davis geoff@geoffdavis.net
Sat, 27 Jul 2002 11:08:09 -0400


I have been working on form handling in Plone, and one thing that I noticed
was that at present almost all create/edit actions terminate by sending you
to the new/edited object's view or edit page with some kind of notification
that your changes have taken effect.  I think it would make for a better
user experience if developers had the option of sending users back to the
page they were at when they initiated an action.  This wouldn't be the
appropriate behavior in all cases, of course, but providing the option
requires a bit of work, in Plone, the CMF, or both.

I'm wondering what people's thoughts are on the best way to implement
something like this.  I'm new to the Actions machinery, but from my initial
poking around, it looks like the simplest way to address this is by
modifying main_template.pt so that the action tabs append a 'return_to'
value to the query (e.g. instead of <a href="action">action</a>, do <a
href="action?return_to=here">action</a>.

In the longer term, is this the kind of thing that should be built into the
CMF machinery?  For example, one could add a return_to query parameter to
all the actions specified in the various factory_type_information
specifications for the built-in content objects.  Or the Actions machinery
could be modified to supply some basic state information to all actions.
Thoughts?

Geoff



Geoff Davis
http://www.geoffdavis.net