Please refer to the Liquid documentation for more informations on how to use Liquid conditional blocks.
User any boolean variables.
{% if document.invoice? %} Invoice number: {{ document.number }} {% elsif document.estimate? %} Estimate number: {{ document.number }} {% endif %}
You can also use these blocks to check the presence of a text variable
{% if document.top_text %} {{ document.top_text }} {% endif %}
Please refer to the Liquid documentation for more informations on how to use Liquid for loops
Feel free to use any array variables.
<ul> {% for vat_total in document.vat_totals %} <li>{{ vat_total.percentage }} - {{ vat_total.amount }}</li> {% endfor %} </ul>