default
A fallback for nil, false or empty values.
allow_false keeps false as a value.
Syntax
Section titled “Syntax”value | default: fallbackParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
fallback (required) |
any | Value to use instead. |
allow_false |
boolean | Treat false as a value. |
Returns
Section titled “Returns”any
Example
Section titled “Example”{{ product.metafields.custom.subtitle | default: 'Made in Doha' }}Made in DohaCompatibility
Section titled “Compatibility”Shopify: Same as Shopify.
Since theme platform 1.0.
Was this page helpful?

