Basic concepts
Theme
A Theme is a zip packed file containing all the templates, snippets and assets that you can install in Store Pages for your business in order to customize your pages.
Templates
With templates, you can create representations of the data about your business and locations.
Each template is created with a specific Content Type
which allows you to render various types of views, such as HTML, CSS, Javascript or JSON. The URL Config
of the template defines the entry point for those resulting views.
Store Pages uses Liquid template language for defining templates. Above the standard implementation of the Liquid syntax, we have some more custom tags and filters that you can use. Check the chapters for custom tags and custom filters.
Template files always have the file extension .liquid
Variables
Inside every template, there is a context with variables that you can show. There are two types:
- Theme variables, provided from the config file.
- Store Pages variables with data about business and locations and determined by the
Type
of template.
Check the chapter for context variables.
Snippets
For a better managing of your templates, you can split the code into pieces called snippets. These pieces are just template files using the same Liquid syntax that you can insert into other templates or even, inside other snippets.
Snippet files always have the file extension .liquid
Locales
Locale files are JSON files that contain a set of translations for text strings used throughout the theme.
Assets
Assets are those static files such as images, css, javascript, svgs, … that you can use inside templates. Assets will be served as is, without any modification or templating. If you need to use some of the data context inside any kind of asset, you have to create it as another template with the right Content-Type
.
Pages
You can create representations of the data about your business and locations. Those representations are called pages. Echa type of template can contain many pages and also pages with translated content.