Direkt zum Inhalt

Learn Rules in a Day!

During this training you’ll get to know one of Drupal’s most powerful extension - the Rules module. While getting started with simple examples you’ll learn about basic concepts and tips & tricks, making your life easier. After that, we’ll dive more into the matter, learn about useful accompanying modules and leverage some more advanced Rules features like loops, lists and the Rules scheduler. Finally, it will be shown how Rules can be extended with new events, conditions and actions.

Materials provided

Handouts will help to keep everything organized during the training. Furthermore, all training exercises are made available online, including suggested solutions and features/code describing the solutions. All online material will continue to be available to attendees after the training.

Course objectives

Become comfortable with the Rules modules, including its more advanced features
Get to know important modules exposing even more power to Rules
Understand how Rules works and can be leveraged best
Know how to extend Rules with new events, conditions and actions
All attendees must have a working local Drupal 7 environment pre-installed on their notebooks, along with everything needed to install additional contributed modules.


Warming up

  • Understanding the key concepts - events, conditions, actions.
  • Reacting on an event
  • Understanding Rules & Entities - A true love story!
  • Handling data in Rules - Common pitfalls and best practices
  • Working with lists & loops
  • Using Rules components with Views Bulk Operations
  • Introduction to Rules Scheduler
  • Sending reminders using Rules Scheduler
  • Debugging Rules & Rules Scheduler

Taking off

Based on our new skills, we get to know modules that expose more power to Rules. We’ll implement some real-life use cases like the following:

  • Allow users to report malicious content
  • Providing custom content moderation quick links (Publish, Promote content, …)
  • Automated blog post announcement on Twitter

Extending Rules

… isn’t hard - we’ll show how Rules can be extended without being a PHP expert.

  • Providing conditions and actions
  • Exposing new event
  • Invoking Rules components from code
  • Exposing entity properties to Rules

Target Audience

This training is targeted on experienced sitebuilders with at least basic knowledge of PHP.

Attendees should have a solid knowledge of Drupal 7, including entities, fields and views. For the coding part at least some basic knowledge of PHP, creating modules and hooks is required.