Forums / General / Redirect after Publish to current node - not to parent node?

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