mirror of
https://github.com/kemko/liquid.git
synced 2026-01-07 10:45:42 +03:00
Big refactoring of SCSS active state for sidebar links update gitignore for node_modules folder removing node_modules from index Sticky Liquid link in sidebar Cleaned up index page Adding fixed width to buttons Refactoring Converted sidebar to use Collections Refactor sidebar CSS
494 B
494 B
title
| title |
|---|
| default |
default offers a means of having a fall-back value in case your value doesn't exist.
{% highlight liquid %} {% raw %} {{ product_price | default:2.99 }} // => outputs "2.99"
{% assign product_price = 4.99 %} {{ product_price | default:2.99 }} // => outputs "4.99"
{% assign product_price = "" %} {{ product_price | default:2.99 }} // => outputs "2.99" {% endraw %} {% endhighlight %}
default will use its substitute if the left side is nil, false, or empty.