Skip to main content

default

variable | default: variable

Sets a default value for any variable whose value is one of the following:

{{ product.selected_variant.url | default: product.url }}

Output

/products/health-potion
variable | default: variable, allow_false: boolean

By default, the default filter's value will be used in place of false values. You can use the allow_false parameter to allow variables to return false instead of the default value.

{%- assign display_price = false -%}

{{ display_price | default: true, allow_false: true }}

Output

false
Was this page helpful?
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy