Last active
November 9, 2020 18:34
-
-
Save juampynr/660219418bde29b6d107 to your computer and use it in GitHub Desktop.
Revisions
-
juampynr revised this gist
Nov 9, 2020 . No changes.There are no files selected for viewing
-
juampynr revised this gist
Nov 9, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,8 @@ Drupal 7's default behavior is to redirect the user to the full display of a nod If you want to stay in the edit form after saving, add this snippet to a custom module adjusting the module namespace in the two functions. For Drupal 8 or 9, have a look at the comment below by @zanvidmar. ## Acknowledgements * [msnbc](http://www.msnbc.com) -
juampynr revised this gist
Nov 9, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Drupal 7's default behavior is to redirect the user to the full display of a node after it has been saved. If you want to stay in the edit form after saving, add this snippet to a custom module adjusting the module namespace in the two functions. -
Juampy revised this gist
May 27, 2015 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ Drupal's default behavior is to redirect the user to the full display of a node after it has been saved. If you want to stay in the edit form after saving, add this snippet to a custom module adjusting the module namespace in the two functions. ## Acknowledgements * [msnbc](http://www.msnbc.com) * [Karen Stevenson](https://www.lullabot.com/who-we-are/karen-stevenson) -
Juampy created this gist
May 27, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ /** * Implements hook_form_BASE_FORM_ID_alter(). */ function mymodule_form_node_form_alter(&$form, &$form_state, $form_id) { $form['actions']['submit']['#submit'][] = '_mymodule_node_submit_redirect'; } /** * Extra node form submit handler. Done this way to override the default. */ function _mymodule_node_submit_redirect($form, &$form_state) { if (isset($_GET['destination'])) { unset($_GET['destination']); } $form_state['redirect'] = 'node/' . $form_state['nid'] . '/edit/'; }