If you want to execute multiple statements for the else condition, enclose the code in curly brackets. If you only need to execute a single statement for the else condition, you do not need to use curly brackets.
The multiple IF conditions in Excel are IF statements contained within another IF statement. They are used to test multiple conditions simultaneously and return distinct values. The additional IF statements can be included in the “value if true” and “value if false” arguments of a standard IF formula.
Unfortunately, Liquid has a poor implementation of boolean algebra.
Using Liquid's operators and tags, here is a dirty way to achieve it:
{% if include.featured == true and product.featured == true %}
{% assign test = true %}
{% endif %}
{% if include.featured == false and product.featured == false %}
{% assign test = true %}
{% endif %}
{% if test %}
Yepeeee!
{% endif %}
Another way you can condense this is to combine else if statements, and booleans don't necessarily need the "==" when evaluating true:
{% if include.featured and product.featured %}
{% assign test = true %}
{% elsif include.featured == false and product.featured == false %}
{% assign test = false %}
{% endif %}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With