Liquid Boolean "not" Operator

Hi. I’m trying to use the Boolean “not” operator in Liquid. It’s not working as expected, and is documented as a supported function in the Liquid Variable Reference. Example:

    {% assign test1 = true not true %}
    {% assign test2 = false not false %}
    {% assign test3 = true not false %}
    {% assign test4 = false not true %}

    {{test1}}
    {{test2}}
    {{test3}}
    {{test4}}

Output:

true
false
true
false

Can anyone explain the proper way to use this operator? I tried with parenthesis, but it only accepts forms like “true not(true)” not “not true” – you seem to always need something on the left and right side of it. Ideas??

0 1 2,950
1 REPLY 1
Top Labels in this Space