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

The master template

The master.twig view is the master template of your theme. All other view files use the master template to render their content.

Elements like the header and footer, that are repeated on every page of your theme, will be included within the master view.

A typical master.twig file looks like the example above.

Partials are included within a view using the {% include '' %} tag.


Requirements

Within the master view you must include the following:

{{ global.header|raw }} dynamically loads all of the required meta tags for a page and any other scripts or tags entered into the account (such as the visitor tracking script). It should be placed within the <head> tag of the page.

{{ global.footer|raw }} servers a similar purpose to the global.header object and loads scripts and other code entered into the account (such as the live chat script). It should be placed immediately before the closing </body> tag.

{% block content %}{% endblock %} to include the content from the view being rendered.

Any macros you want to include can be included at the top of the master view using {% import '' %}