If/else tags in Templates
With an if/else tag, you can define 2 types of text whose tag determines when which text should be sent.
Example custom text for the Belvilla channel
For example, you can show different text in your Reservation confirmation to reservations from a certain channel than when they come in via your own website or all other channels.
{%- if channel.name == "Belvilla" -%}
This is the text I want to send to reservations via Belvilla
{%- else -%}
And this is the text I want to send to all other Channels.
{%- endif %}
Example custom text for segments
It is possible to use tags in a template for multiple segments. The following segments can be distinguished:
apartment: Apartment
berth: Berth
house: Holiday house
pitch: Camping pitch
room: Room
other: Other accommodation
Below is the example of segments holiday homes, berths and other accommodation with the corresponding tags.
{%- if rentable_type.semantic_segment == "house" -%}
For holiday homes, type the text here.
{%- elsif rentable_type.semantic_segment == "berth" -%}
For berths type the text here.
{%- else -%}
And for other accommodation type the text here.
{%- endif %}
The build is such that when a reservation is made on a holiday home, the tag {% if rentable_type.semantic_segment == "house" -%} is used. The text used under this tag is then included in the template in which you set this tag.
When a visitor makes a reservation for the berth segment, the tag {%- elsif rentable_type.semantic_segment == "berth" -%} will be used. Again, the text used under the tag is included in the template in which you set this tag.
When a Reservation is made on another accommodation, the tag {%- else -%} will be used. Next, enter the text you want to include with this tag and place the tag {%- endif %} below it as you can see above.
Note! When using the tags, you need to specify the segments in English.