Liquid::If
Inherits Liquid::Block / Liquid::Tag / Reference / Object
If is the conditional block
{% if user.admin %} Admin user! {% else %} Not admin user {% endif %}
There are {% if count < 5 %} less {% else %} more {% endif %} items than you need.
Constants
ExpressionsAndOperators = /(?:\b(?:\s?and\s?|\s?or\s?)\b|(?:\s*(?!\b(?:\s?and\s?|\s?or\s?)\b)(?:#{QuotedFragment}|\S+)\s*)+)/
Syntax = /(#{QuotedFragment})\s*([=!<>a-z_]+)?\s*(#{QuotedFragment})?/
SyntaxHelp = "Syntax Error in tag 'if' - Valid syntax: if [expression]"
Constructors
new(tag_name, markup, tokens)
SourceInstance methods
render(context)
Sourceunknown_tag(tag, markup, tokens)
Source