Skip to main content
All CollectionsTemplates
Exclude or include in Templates
Exclude or include in Templates

For example: show only Flight deal items

Geertje avatar
Written by Geertje
Updated over 2 years ago

To exclude or include info for your t shows you can use an if-statement.

If this, then that

The code is basically this.

You open the for loop with the following code:
{% for e in events %}

Within this for loop you can use the same tags as you would normally use. You only add the prefix of the defined 'e'.

So within the for loop the {{ event.start }} will become {{ e.event.start }}.

At the end, close a for loop with an {% endfor %} tag.

Example:
{% for e in events %}
{{ e.event.start | date: "%B %-d, %Y" }}
{{ e.event.title }}
{{ e.project.title }}
{{ e.event.stage }}
{% endfor %}

This code will display the fields per linked event.

The same works for deal items.

{% for items in event.deal %}
{{ items.type }}
{{ items.tickets}}
{{ items.tickets_type }}
{{ items.amount | format_money }}

{% endfor %}

Did this answer your question?