PDFMonkey Liquid tags

load_snippets / include

As documented in the Snippets documentation, you can import and include Snippets in a Template. They're just like partials (see below) but shared.

Snippet: greating
<p>Hello {{name}}!</p>
{%- load_snippets 'greating' -%}
{% include 'greating', name: "Jane Doe" %}
<p>Hello Jane Doe!</p>

partial / include

Partials are like Snippets but located directly within a Template and you don't need to load them before including them:

{%- partial 'line-item' -%}
{%- endpartial -%}

{% for lineItem in lineItems %}
  {% include 'line-item', product: lineItem %}
{% endfor %}

Last updated