How to use loops to automatically repeat content in mail templates

 

Mews sends emails to guests on your behalf with relevant information regarding their reservations and payments. In Mews, you can build a new template for an existing email from scratch and customize it according to your property’s branding. You can use loops to automatically repeat a row of content for each item in a list, for example, breakfast, parking or multiple reservations. If a reservation includes three additional bookings, the looped content appears three times, once for each booking. Once you create a loop, you need to close it. This is important if you have nested loops, for example, a loop within another loop. You can delete any customized templates you edit if required or use the default Mews template.

Displays an email draft with a "Select a display condition" pop-up. There is a red box highlighting the "Rendering loops" button.

To use loops to automatically repeat content:

  1. In Mews Operations, go to the main menu Menu arrow right  > Settings > Property > Guest experience > Mail templates.
  2. Find the template you want to edit and click Edit.
  3. Click the Rows tab, then in the dropdown, click:
    • Empty: To select the default rows without any content. Note: If you add a default row, you need to add content to it before you can create a loop.
    • Mews: To select the customized rows with Mews content.
  4. Drag and drop a row block to insert it into the template.
  5. In the side-window, go to Dynamic content and click Select condition. Note: You can also click Add condition to add your own customized content. This is optional and requires knowledge of HTML and its use. For advanced users only.
  6. In the new window, click Rendering loops, then click to select from the following:
    • Start reservation loop: To display every future reservation for that guest.
    • End loop: To close a loop. You need to use this to close reservation loops and extra loops.
    • Cancellation loop: To display every cancellation policy in the reservation.
    • Extra loop: To display every extra in the reservation, for example, additional services.
    • Pricing item loop: To display every item in the reservation, for example, welcome drink, massage or dinner.
  7. To close the loop, you can:
    • Drag and drop a new row block under the loop you created, go to Dynamic content > Select condition > End loop, or
    • In the existing loop, go to Dynamic content > Edit, then under After, enter “{% endfor %}” and click Save.
    • Note: You only need to close the Start reservation loop and Extra loop.
  8. Click Preview to preview the email.
  9. Click Save and exit to save or click Reset to remove all customizations and revert back to the default Mews templates.

This adds a loop to repeat a content row in the mail template.

 

Was this article helpful?
00



Feedback