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

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -