If the input variable is not true then this will display the output.
{{ input | else: output }}
input
string. required. The variable to check if it is true or exists.output
string. required. The variable to output if the input is false or does not exist.{% assign var1 = "hello world" %}
{% assign var2 = "" %}
Example 1: {{ var1 | else: "goodbye world" }}
Example 2: {{ var2 | else: "goodbye world" }}
Example 1: hello world
Example 2: goodbye world