Tags
Tags are control structures like loops and if/else blocks that direct the template flow.
Tags can be used for operations such as assigning variables, defining conditions, and looping through lists. In addition to supported Twig tags, Square extensions provide additional functionality, such as adding items to the cart.
In page templates, tags are wrapped in {% %}
:
{% tag_name [variable_or_expression] %}
...
{% endtag_name [variable_or_expression] %}
Supported tags
You can use the following tags in Square Online page templates:
Tag | Description |
---|---|
item_form | Adds an item to the cart. |
form | Adds a submission form to a website. |
paginate | Provides pagination context variables to load the next or previous page of data. |
schema | Defines the expected payload for a template. |
Twig tags | Supported core Twig tags. |