This resource acts as a default layout for the whole store.
This resource is required
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{{ settings.store.name }}</title>
{{ 'style.css' | resource_url | stylesheet_tag }}
</head>
<body>
{{ content }}
// Due to the fact that the javascript hook is just above (js_hook)
// by now you should already have access to jQuery.
// Read more about this in the Javascript API "Loading" section.
$(document).ready(function(){
// Your javascript code here
});
</body>
</html>
From /layouts/default.liquid you have access to the following variables:
| Variable | Type | Description |
|---|---|---|
| content | String | Contains the current template |
| settings.store | Object | An object containing all available store settings |
| settings.store.name | String | The name of your store |
| settings.store.contact_email | String | The contact email address of your store |
| settings.store.address | String | The address value in your shop settings page |
| settings.store.city | String | The city value in your shop settings page |
| settings.store.state | String | The state value in your shop settings page |
| settings.store.country | String | The country value in your shop settings page |
| settings.store.zipcode | String | The zipcode value in your shop settings page |
| settings.store.currency | String | The currency used by your store |
Ticket Rewards will use the default.liquid layout for all your templates. It is however possible to use other layout files for different templates.
To use a different layout file (eg. narrow.liquid from /layouts/narrow.liquid) add the following at the beginning of your template:
{% use_layout "narrow" %}
Blog • Privacy Policy • Terms & Conditions • Copyright 2024 Ticket Rewards