Skip to content

liquid.tags.standard

module

liquid.tags.standard

Provides standard liquid tags

Functions
  • assign(token, parser) (Node) The assign tag {% assign x = ... %}</>
  • capture(token, parser) (Node) The capture tag {% capture var %}...{% endcapture %}</>
  • case(token, parser) (Node) The case-when tag {% case x %}{% when y %} ... {% endcase %}</>
  • comment(token, parser) (Node) The comment tag {% comment %} ... {% endcomment %}</>
  • cycle(token, parser) (Node) The cycle tag {% cycle ... %}</>
  • decrement(token, parser) (list of Node) The decrement tag {% decrement x %}</>
  • increment(token, parser) (list of Node) The increment tag {% increment x %}</>
  • tablerow(token, parser) (Union(node, list of node)) The tablerow tag {% tablerow ... %} ... {% endtablerow %}</>
  • unless(token, parser) (Node) The unless tag {% unless ... %} ... {% endunless %}</>
function

liquid.tags.standard.comment(token, parser)

The comment tag {% comment %} ... {% endcomment %}

This tag accepts an argument, which is the prefix to be used for each line in the body. If no prefix provided, the entire body will be ignored (works as the one from liquid)

Parameters
  • token (Token) The token matches tag name
  • parser (Parser) The parser
Returns (Node)

The parsed node

function

liquid.tags.standard.capture(token, parser)

The capture tag {% capture var %}...{% endcapture %}

Parameters
  • token (Token) The token matches tag name
  • parser (Parser) The parser
Returns (Node)

The parsed node

function

liquid.tags.standard.assign(token, parser)

The assign tag {% assign x = ... %}

Parameters
  • token (Token) The token matches tag name
  • parser (Parser) The parser
Returns (Node)

The parsed node

function

liquid.tags.standard.unless(token, parser)

The unless tag {% unless ... %} ... {% endunless %}

Parameters
  • token (Token) The token matches tag name
  • parser (Parser) The parser
Returns (Node)

The parsed node

function

liquid.tags.standard.case(token, parser)

The case-when tag {% case x %}{% when y %} ... {% endcase %}

Parameters
  • token (Token) The token matches tag name
  • parser (Parser) The parser
Returns (Node)

The parsed node

function

liquid.tags.standard.tablerow(token, parser)

The tablerow tag {% tablerow ... %} ... {% endtablerow %}

Parameters
  • token (Token) The token matches tag name
  • parser (Parser) The parser
Returns (Union(node, list of node))

The parsed node

function

liquid.tags.standard.increment(token, parser)

The increment tag {% increment x %}

Parameters
  • token (Token) The token matches tag name
  • parser (Parser) The parser
Returns (list of Node)

The parsed node

function

liquid.tags.standard.decrement(token, parser)

The decrement tag {% decrement x %}

Parameters
  • token (Token) The token matches tag name
  • parser (Parser) The parser
Returns (list of Node)

The parsed node

function

liquid.tags.standard.cycle(token, parser)

The cycle tag {% cycle ... %}

With name: {% cycle "name": "one", "two", "three" %} Without: {% cycle "one", "two", "three" %}

Turn these to {{ loop.liquid_cycle("one", "two", "three", name=...) }}

Parameters
  • token (Token) The token matches tag name
  • parser (Parser) The parser
Returns (Node)

The parsed node