Rick Brooke
Rick Brooke

Reputation: 11

Disable Drupal redirecting to page view after edit

How do I disable the edit page redirecting to either the page view or the list of site contents upon saving?

I prefer to keep the edit page open whilst refreshing the page view in another browser window, and it is really annoying having to click back into the edit view every time I click on 'Save'.

I cannot find anything in the documentation or online telling me where I can turn off this behaviour ?

Upvotes: 1

Views: 888

Answers (2)

PedroKTFC
PedroKTFC

Reputation: 745

Use this module, it adds an extra button to save and stay in edit: https://www.drupal.org/project/save_edit

Upvotes: -1

Djouuuuh
Djouuuuh

Reputation: 1167

If you want this behaviour both on node creation and update, and for every content-type, you can do something like:

function hook_node_insert($node) { // and for hook_node_update
  $_GET['destination'] = 'node/' . $node->nid . '/edit';
}

EDIT : Of course I don't know your Drupal level so I didn't say that you have to put it in a custom module, etc, etc. If you need more information about that, just ask ;-)

Upvotes: 3

Related Questions