jekyll - Does Liquid have a does not contain or not in array operator? -


when calling items , array in liquid template, how call does not contain or not in array?

unless rescue !

create [a, b, c] array.

{% assign input = "a,b,c" | split:"," %} 

unless print if constrain not met.

this prints nothing:

{% unless input contains 'a' %}no a{% endunless %} 

this prints "no z":

{% unless input contains 'z' %}no z{% endunless %} 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -