4

as you know after publishing a node Drupal redirects to that node. How Can I change this functionality ? I want to force it to stay on the same page or maybe redirect it admin page instead of nodes.

3

You can use rules to achieve this easily, here:

Add a new rule and give it a name.

Event:

After saving new content

Conditions:

Content is of type - and chose your content type you want this rule to react on.

Actions:

Page redirect - and enter your destination.

here is an export of a rule that will redirect to homepage after insert a new node of type article.

{ "rules_test" : {
    "LABEL" : "test",
    "PLUGIN" : "reaction rule",
    "REQUIRES" : [ "rules" ],
    "ON" : [ "node_insert" ],
    "IF" : [
      { "node_is_of_type" : { "node" : [ "node" ], "type" : { "value" : { "article" : "article" } } } }
    ],
    "DO" : [ { "redirect" : { "url" : "\u003Cfront\u003E" } } ]
  }
}
  • Let me know if you need additional help. :) – saadlulu Oct 3 '12 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.