How to use multiple arguments in an if statement with Liquid

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 %}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)