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!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:33:09
Script start
Timing: Jan 18 2025 11:33:09
Module start 'layout'
Timing: Jan 18 2025 11:33:09
Module start 'content'
Timing: Jan 18 2025 11:33:09
Module end 'content'
Timing: Jan 18 2025 11:33:09
Script end

Main resources:

Total runtime0.0206 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 587.9063152.6250
Module start 'layout' 0.00780.0035 740.531339.4297
Module start 'content' 0.01140.0068 779.960993.4141
Module end 'content' 0.01820.0024 873.375038.3047
Script end 0.0206  911.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002914.3102140.0002
Check MTime0.00126.0316140.0001
Mysql Total
Database connection0.00083.737210.0008
Mysqli_queries0.004321.095030.0014
Looping result0.00000.126110.0000
Template Total0.00188.910.0018
Template load0.00115.168510.0011
Template processing0.00083.703710.0008
Override
Cache load0.00083.784710.0008
General
dbfile0.00031.361880.0000
String conversion0.00000.054440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs