Liquid templates & field names

Greetings community!

I’m glad I discovered this software. I’m just getting into customising the themes and I’m quite happy with the way it’s going!

But there’s a lot of trial and error moving the fields around to suit my business.

For example, I’m moving the date to a different position. So I do:

{% for field in fields %}{% if field.label == "Date" %}
{{ field.label}}: {{ field.text}}
{% endif %}{% endfor %}

which works if I preview the theme via customise, but won’t work if viewing a Sales Quote. I suspect the field name for date might be different if it’s an invoice or quote?

My question is if there is a guide to the field names & variables that I can call in the liquid markup?

1 Like

No. But search the forum and you will find some users’ attempts to piece together lists. If you haven’t realized it, understand the fields are actually an array, not single variables.

Old question… but in case anyone else is looking for this, you actually can debug the array in json with:

{{ variable | json }}

So if you want to get all fields, just do:

{% for field in fields %}
{{ field | json }}
{% endfor %}

and you will get the whole array as string like:

[label, Reference][text, 1001][emphasis, False]

Witch is:

field.label    = Reference
field.text     = 1001
field.emphasis = false