RentalWise offers over 368 merge fields to customize your message templates, allowing for dynamic and personalized communication. However, you can take automation even further using advanced tools like Twig.
Twig is a powerful and flexible templating engine designed for PHP environments. It is widely used in web development due to its speed, security, and flexibility. By leveraging Twig in your message templates, you can create customized, automated responses that go beyond standard merge fields.
✔ Fast – Twig compiles templates into optimized PHP code, ensuring minimal performance overhead.
✔ Secure – With a built-in sandbox mode, Twig allows for safe template modifications without security risks.
✔ Flexible – Developers can create custom tags, filters, and logic to enhance template functionality.
Twig is widely supported and used by popular frameworks such as Symfony, Laravel, Yii, CodeIgniter, Drupal 8, and phpBB, among others.
By incorporating Twig into your templates, you can:
Format dates and times dynamically based on user preferences.
Apply conditional logic (e.g., send different messages depending on booking status or channel).
Use mathematical operations to calculate fees or discounts directly in the template.
Instead of a static message like:
"Your check-in date is {{ record.checkin }}."
You can format it dynamically:
"Your check-in date is {{ record.checkin|date('l, F jS, Y') }}."
This would display:
"Your check-in date is Saturday, March 9th, 2025."
To fully utilize Twig in your templates, refer to the official documentation:
📌 Date Formatting: PHP DateTime Format Guide
📌 Twig Documentation: Twig Official Docs
By integrating Twig into your automations, you can significantly enhance customization and efficiency, ensuring a more personalized guest experience. 🚀