Example Rule to Import

{ "rules_fools_rules_example" : {
    "LABEL" : "Fool\u0027s Rules Example",
    "PLUGIN" : "reaction rule",
    "REQUIRES" : [ "fools_rules" ],
    "ON" : [ "fools_rules_event_page_alter", "fools_rules_event_form_alter" ],
    "DO" : [
      { "fools_rules_action_page_alter" : {
          "property" : "footer:system_powered-by:#markup",
          "value" : "Hello World!"
        }
      },
      { "fools_rules_action_form_alter" : {
          "form_id" : "search_block_form",
          "property" : "search_block_form:#default_value",
          "value" : "Hello World!"
        }
      }
    ]
  }
}

Result

Fool's Rules example image

Notice the changed footer text from "Powered by Drupal" to "Hello World!" and also the now set default value of the search box to "Hello World!". The module can be used to set any bundle, form or page array values such as weight, visibility, required, etc. No more custom module required for your page/form/bundle alters!

CommentFileSizeAuthor
Fools Rules.jpg33.89 KBseandunaway