flag and rules working together
play

FLAG AND RULES WORKING TOGETHER Link Swanson | link@mustbuild.com - PowerPoint PPT Presentation

FLAG AND RULES WORKING TOGETHER Link Swanson | link@mustbuild.com FLAG MODULE drupal.org/project/flag RULES MODULE drupal.org/project/rules WARNING: I AM NOT AN EXPERT When it comes to Rules and Flag, my knowledge is just enough to be


  1. FLAG AND RULES WORKING TOGETHER Link Swanson | link@mustbuild.com

  2. FLAG MODULE drupal.org/project/flag

  3. RULES MODULE drupal.org/project/rules

  4. WARNING: I AM NOT AN EXPERT When it comes to Rules and Flag, my knowledge is “just enough to be dangerous.”

  5. DOWNLOAD AND ENABLE MODULES 1. Download: Flag, Rules, Date, Views, cTools, Entity, Token, Interval 2. Enable: flag, flag_actions, rules, rules_admin, rules_scheduler, views_ui, date, date_views drush @yoursite en -y flag flag_actions rules rules_admin rules_scheduler date token interval email

  6. SET UP THE EVENT CONTENT TYPE Add field: Date (ISO Format)

  7. SET UP THE FLAG /admin/structure/flags/add Flag type: Node Add field: Interval “When to send reminder”* Add field: Email “Where to send reminder”* * Required fields

  8. CREATE THE SEND MAIL COMPONENT admin/config/workflow/rules/components +Add new component Parameter: Event (Node) Parameter: Flagging (Flagging) To: [flagging:field-email-address] Subject: Reminder about [event:title] on [event:field_date] Body: Don't forget about [event:title] on [event:field_date]

  9. CREATE THE RULE TO SCHEDULE THE COMPONENT admin/config/workflow/rules +Add new rule React on event: Node is flagged Condition: Entity has Field Entity: Flagging Field: ‘When to send’ Action: Calculate a value Calculation: flagging:field-when-to-send:interval * -1 Provided Variables: “interval_negated”

  10. CREATE THE RULE TO SCHEDULE THE COMPONENT (Continued) Action: Apply interval to a date: Interval Number: interval-negated Interval Period: flagging:field-when-to-send:period Date: flagged-node:field-date Action: Schedule component evaluation: Component: Send event reminder Scheduled Evaluation Date: schedule-date Flagging: flagging Event: flagged-node

  11. SET UP THE IDENTIFIER [flagged-node:nid]- [flagging:field-email-address]- [flagging:field-when-to-send:interval]- [flagging:field-when-to-send:period]

  12. CREATE THE RULE TO DELETE THE SCHEDULED COMPONENT ON UNFLAG EVENT admin/config/workflow/rules +Add new rule React on event: Node is flagged Condition: Entity has Field Entity: Flagging Field: ‘When to send’ Action: Rules Scheduler: Delete scheduled tasks: Component: Send event reminder

  13. SET UP THE IDENTIFIER [flagged-node:nid]- [flagging:field-email-address]- [flagging:field-when-to-send:interval]- [flagging:field-when-to-send:period]

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend