Forums / Developer / redirect after discard

redirect after discard

Author Message

Michele Franceschi

Thursday 18 March 2004 5:50:13 am

Can I set a Redirect URI for Discard action? Now return only to /content/view/full/...

Balazs Halasy

Thursday 18 March 2004 6:02:17 am

Hmm, you mean by using a hidden variable defined in the same POST block as the "Discard" button? Not sure that this is possible. Check the admin template that is used in the same discard operation as the one you're looking for; perhaps you'll find an answer to your question there. You could also peek at the code (in /kernel/content/).

Balazs

Dan C

Friday 11 February 2005 9:04:54 am

Has anyone figured out how to do this? the hidden RedirectURI doesn't seem to work when discarding.

Thanks,

Dan

Clemens T

Wednesday 26 October 2005 4:52:22 am

Heya.. yes:

            <input type="hidden" name="RedirectURIAfterPublish" value="/extranet/my_profile/" />
            <input type="hidden" name="RedirectIfDiscarded" value="/extranet/my_profile/" />

Matthew Carroll

Friday 14 April 2006 1:27:35 pm

That works well for redirecting to a static location, thanks for the tip. (Watch out though - don't try passing the link you're redirecting to through |ezurl - that doesn't work.)

Now, does anyone know how I can set that dynamically to the previous page, i.e. what template code will give me the url of the page the user was on last? Is this even possible? Returning the user to the most recent page on cancel does seem to be obvious functionality, but I can't work out how to do it!

Assistance appreciated! :-)

Thanks
Matthew

http://carroll.org.uk

Kristof Coomans

Saturday 15 April 2006 12:54:08 am

Use the LastAccessesURI session variable. You can get it with the ezhttp template operator.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Clemens T

Monday 17 April 2006 7:10:08 am

Helpful comment there Kristof, didn't know that!