default - Liquid Tag Reference - 1.0.0
Tag Name | default |
Version | 1.0.0 |
Description
Define default values for template variables.
Examples
You can define a default value for the variables used in your template. If no value is supplied for them when the template is rendered, the default value will be used.
{% default who: 'Mary', what: "lamb" %}
{{ who }} had a little {{ what }}.
Mary had a little lamb.
When variables are supplied, they will be used instead of the default value.
who: "Tarzan"
what: "chimp"
{% default who: 'Mary', what: "lamb" %}
{{ who }} had a little {{ what }}.
Tarzan had a little chimp.
Back to Liquid Reference for 1.0.0
Back to Documentation