Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Drupal Rules!


Published on

The Rules module can be used to automate simple and complex tasks on your Drupal site without programming. Learn how to use standard Rules features to modify content, notify users, or redirect URLs. Then we will look at how Rules integrates with other Drupal modules like Flag and Views to provide even more power. We will see how Rules provides amazing flexibility to customize your site.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Drupal Rules!

  1. 1. Drupal Rules!Scott Povlot (@spovlot)Drupalcamp Atlanta 2012October 27, 2012 DrupalCamp Atlanta #DcATL #drupal-rules
  2. 2. Why Rules?Add Custom Functionality in DrupalCreate Complex Reactions to EventsIntegration with lots of ModulesFast DevelopmentNo Programming Necessary DrupalCamp Atlanta #DcATL #drupal-rules
  3. 3. Rules Integration Drupal Core Entity API Flags Views Bulk Operations Commerce and Ubercart Organic Groups (OG) UserPoints VotingAPI DrupalCamp Atlanta #DcATL #drupal-rules
  4. 4. Anatomy of a RuleReaction Rule Event Condition (optional) Action Loop DrupalCamp Atlanta #DcATL #drupal-rules
  5. 5. EventsWhen to Perform the RuleCore Events User has logged in After saving new content A comment is viewedContributed Module Events A node has been flagged, under "Like" (Flag) Customer completes checkout (Ubercart) DrupalCamp Atlanta #DcATL #drupal-rules
  6. 6. ActionsWhat to do when the Rule is executedCore Actions Send mail Add a user role Calculate a value Create an entity Page redirectContributed Module Actions Unflag a node (Flag) Update order status (Ubercart) DrupalCamp Atlanta #DcATL #drupal-rules
  7. 7. ConditionsIf the Conditions are True, Perform the Actions Ands & OrsCore Conditions Content is of type Entity has a field Data Comparison User has role(s)Contributed Module Conditions Entity is a group (OG) Check if order can be shipped (Ubercart) DrupalCamp Atlanta #DcATL #drupal-rules
  8. 8. Redirect after Login ExampleDemonstration DrupalCamp Atlanta #DcATL #drupal-rules
  9. 9. VariablesDefault “site” information Current UserProvided by eventsor actions Node User EntityTypes Text, Integer, Decimal, Truth Value, Date, Entity
  10. 10. Lists and LoopsLists Multiple value fields Fetch entity by property Fetch users who have flagged a ... Load from a VBO ViewLoops Iterate over a lists of data Perform actions on each item DrupalCamp Atlanta #DcATL #drupal-rules
  11. 11. “Hints” via ConditionsAdd one of the following conditions Content is of type Entity is of type Entity has fieldWhen Rules does not show type specific fields DrupalCamp Atlanta #DcATL #drupal-rules
  12. 12. “Follow” Content ExampleDemonstration DrupalCamp Atlanta #DcATL #drupal-rules
  13. 13. Rules ComponentsReusable Chunks of Rules Condition set (OR) Condition set (AND) Action set Rule Condition and Actions without an event Rule set DrupalCamp Atlanta #DcATL #drupal-rules
  14. 14. VBO Action with RulesDemonstration DrupalCamp Atlanta #DcATL #drupal-rules
  15. 15. Debugging RulesRules Settings admin/config/workflow/rules/settingsShow debug information - Always DrupalCamp Atlanta #DcATL #drupal-rules
  16. 16. Rules Resources DrupalCamp Atlanta #DcATL #drupal-rules
  17. 17. Questions?Drupal Rules!Scott Povlot (@spovlot)Drupalcamp Atlanta 2012October 27, 2012#DcATL #drupal-rules DrupalCamp Atlanta #DcATL #drupal-rules