Name: Notify content admins of new content.Go to admin/config/workflow/rules and click to "Add new rule".Notify content administrators when new content is posted by non-content administrators. Create new user with "content administrator" role.Create new roles: content administrator (no additional permissions), author ("Article: create new content", "Article: edit own content").This screencast is a good resource to get started. Using data selectors effectively is the key to writing powerful rules.Most important Rules tip ever! When trying to access a specific field via a data selector in an "action", it is usually required that the "entity has field" condition be set for the same field in order for it to work in the "action" For example, if you're trying to access a field called "field_last_name" in an action, be sure to add an "Entity has field" condition for "field_last_name" as well.Here are some of tips and tricks to get you started. While Rules is an extremly powerful module, it is also one usually requires a bit of experience to use effectively. Rules can be disabled without being deleted.Additionally, exported rules can be saved to code (via a Feature or custom module). Rules are "exportable" - they can be exported to a text file, and imported on another site.The Rules "project" contains three modules: Rules, Rules UI, and Rules Scheduler.Main Rules configuration at "Configuration | Workflow | Rules" (/admin/config/workflow/rules).Event: a node is created → Condition: node is published → Action: close comments → Scheduled: +2 weeks from the time the node is created.This is a common use case for rules components. When the "Rules Scheduler" module is enabled, components can be scheduled to run at a future time. For example, if you have a custom action that you want to use in multiple rules, a rule component made up of the custom action can be created then simply added to each rule. Rules components are parts of rules that can be utilized inside other rules. Event: a node is about to be saved → Condition: the image field is empty → Action: display a message asking the author if they're sure they don't want to add an image.Event: a log entry is created → Condition: the log entry's severity is "emergency" → Action: send a message to all users with the role "site administrator".Event: an calendar item node is created → Condition: the calendar item node doesn't have a populated "agenda" field → Action: send the author a message two days before the calendar item date reminding them to populate the "agenda" field.Event: a user joins an Organic Group → Condition: the user does not have the "administrator" role → Action: send the user a welcome message.Event: an article node is saved → Condition: the user who saved the article node has the "content administrator" role → Action: the article node is published. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |