Skip to content

Instantly share code, notes, and snippets.

@steffenr
Created June 27, 2012 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steffenr/3006789 to your computer and use it in GitHub Desktop.
Save steffenr/3006789 to your computer and use it in GitHub Desktop.
Rules Export - check for taxonomy term and unpublish Node
{ "rules_set_forum_content_unpublished" : {
"LABEL" : "set forum content unpublished",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules" ],
"ON" : [ "node_presave" ],
"IF" : [
{ "node_is_of_type" : { "node" : [ "node" ], "type" : { "value" : { "forum" : "forum" } } } },
{ "data_is" : { "data" : [ "node:taxonomy-forums" ], "value" : "3" } }
],
"DO" : [
{ "drupal_message" : {
"message" : "Hello you just saved a Content to Forum b",
"type" : "warning"
}
},
{ "data_set" : { "data" : [ "node:status" ], "value" : "0" } }
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment