Menu Close

Get Support From ShopWired Close

All systems fully operational

Subscribe To Updates
Prefer To Live Chat? Chat directly with ShopWired support Available from 8.00am to 6.00pm (EST) Quickest response time
Send A Message
Response within 24 hours

Menu Close

Menu

Types

In Twig, attributes can be returned in, amongst others, one of the types described below.


Boolean

Booleans are either true or false, e.g.

{% if product.title is 'trainers' %}
    true
{% endif %}

Number

Numbers include floats (numbers with decimals) and integers (whole numbers).


String

A string is a sequence of text.


Arrays

Arrays hold a list of variables (of all types).

To access items in an array you can loop through using the for tag, e.g.

{% for product in products %}
    {{ product.title }}
{% endfor %}

returns...

Nike White Air Max Trainers
Blue Adidas Trainers