Menu Close

Get Support From ShopWired Close

All Systems Are Operational

Subscribe To Updates
Prefer To Live Chat? Chat directly with ShopWired support Available 9.00am to 7.00pm Monday to Friday
11.00am to 5.00pm Saturday
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