Redirect after Publish to current node - not to parent node?

Author Message

Rainer Scharinger

Wednesday 21 January 2009 2:43:48 am

Hi,

when I click after editing on the "Publish"-Button, the page redirects to the parent node (see kernel/content/edit.php:626) - backend editing.

Is there a possibility to redirect to the current node (even if I create a new article, where the node_id is not known in the edit template)?

I thought I could use the POST variable "RedirectURI" in the Template, but I don't know how to build a correct redirect url for new articles where there is no node_id or main_node_id or something like that.

Many thanks for your ideas how to do this without hacking the kernel (4.0.1)!

raghu rao

Tuesday 17 May 2011 2:52:55 am

Hi Rainer,

wondering if you managed to find a solution to this issue?

cheers

R

Barbara Guillemin

Wednesday 22 June 2011 8:53:17 am

Hi Raghu,

I found a solution, just add this line in your edit.tpl override :

 <input type="hidden" name="RedirectURI" value="concat("content/edit/", $object.id)" />

And add in site.ini.append.php file : 

 [ContentSettings]
EditDirtyObjectAction=usecurrent

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 02:21:13
Script start
Timing: Jan 18 2025 02:21:13
Module start 'layout'
Timing: Jan 18 2025 02:21:13
Module start 'content'
Timing: Jan 18 2025 02:21:14
Module end 'content'
Timing: Jan 18 2025 02:21:14
Script end

Main resources:

Total runtime0.7510 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 589.2969152.6563
Module start 'layout' 0.00600.0033 741.953139.5078
Module start 'content' 0.00930.7405 781.4609537.0469
Module end 'content' 0.74980.0012 1,318.50788.0938
Script end 0.7510  1,326.6016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4642160.0002
Check MTime0.00140.1928160.0001
Mysql Total
Database connection0.00120.164610.0012
Mysqli_queries0.696992.7966590.0118
Looping result0.00060.0833570.0000
Template Total0.717695.620.3588
Template load0.00210.277220.0010
Template processing0.715595.271520.3578
Template load and register function0.00030.038910.0003
states
state_id_array0.00090.120810.0009
state_identifier_array0.00060.083820.0003
Override
Cache load0.00170.2257200.0001
Sytem overhead
Fetch class attribute can translate value0.00080.110830.0003
Fetch class attribute name0.00230.302840.0006
XML
Image XML parsing0.00330.443930.0011
class_abstraction
Instantiating content class attribute0.00000.002340.0000
General
dbfile0.00440.5900150.0003
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs