To customize how template data is selected and displayed as output, we use Liquid markup which allows for simple programming logic such as case statements, if statements, for loops, and so on.
Review the Liquid documentation at Liquid for Designers. All of the elements of the language are described in detail.
The following is a brief introduction to how it works:
Liquid is a templating language for rendering email and HTML. It is the mechanism that enables the automated placement of data in templates using Ordway object data (Customer, Invoice, Quote, Statement, etc.)
There are two types of markup in Liquid:
- Output - which is text output contained in double curly brackets.
{{customer.name}} - Tags - which contain the programming logic that determines how the data is expressed.
{% for subscription in subscriptions %}
{{subscription}}
{% endfor %}
Filters
Methods are also available to manipulate text strings and arrays. In Liquid, these methods are referred to as Filters. Using a filter allows you to transform text to uppercase characters, for example.
{{ customer.name | uppercase }}
This is just one of the simplest examples of what filters can do. See the Liquid documentation for more information and also our article about Ordway Liquid Methods.
Read more about Liquid Filters.
Ordway Object Data
Each template type includes corresponding object data available. We made sure that the objects available fit the need for each template, which guarantees the performance to render each document or email process.
To understand the object field names and hierarchy, consult our API Object Definitions and also see Ordway Liquid Glossary.
Special links
Use {{secure_link_url}} to embed a link in your templates to view the Invoice pdf.
Preconditions:
- Customer Accounts must be configured.
- Billing Contacts must be up to date.
- Invoices must be created to use the template.
Comments
0 comments
Please sign in to leave a comment.