class Liquid::If
- Liquid::If
- Liquid::Block
- Liquid::Tag
- Reference
- Object
Overview
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.
Direct Known Subclasses
Defined in:
liquid/tags/if.crConstant Summary
-
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]"