[Zope] Post method redirection / Core changes
Phill Hugo
phill@fortune-cookie.com
Wed, 14 Jun 2000 18:55:13 +0000
Hello all,
We recently had a "sales engineer" from Allaire come and talk to us
about Spectra and were quite surprised at how similar it is to Zope. To
be honest the only thing I left with any "ooh, thats neat" feeling about
was their general style of building objects with the admin view
optionally identical to the user view but with icons inserted below
images, content etc to allow immediate altering of the content.
The same stuff is simple to acheive in Zope, almost. Make a ZClass, add
index_html which adds a header, footer and puts render_html in the
middle. Then use render_html to embed it in other docs and index_html to
view it standalone. Add a check to see if the user is logged in and has
View management screens rights, if so give them little icons "in place"
to edit the content and images.
This works fine..
<dtml-if "AUTHENTICATED_USER.has_permission('View management screens',
'')">
<a href="<dtml-var id>/propertysheets/Basic/manage">
<dtml-var "content_image.tag(border=0)"></a>
</dtml-if>
Now, this part is simple enough but it leads to a problem. The default
methods for updating ZClass properties and images all redirect back to
manage_main by the look of things.
I propose that two things be added to this to allow simple management of
redirection from the update/edit/change methods.
1) All instances of manage_main be changed to manage_workspace so the
default view if given rather then contents_html.
2) That an optional redirect url can be supplied to everywhere this
happens to override the redirect.
Then once a user logs into the site, leaves the admin view after perhaps
joining a version and travels through the site, it has extra icons
immediately allowing them to edit the contents of certain things. The
redirection would take them back to the extended user side view after
pressing submit.
I've looked at Image.py in OFS and this is fairly simple but I thought
I'd suggest it so we could perhaps form some standard on the redirect
url variable that would be passed about.
Any thoughts?
Phill
ps. I've not looked at the DestinationURL stuff properly to see if it
does anything like I'm asking.