Reference
Page types
Every page a theme renders, its JSON template, its address and the variables it receives.
Copy page as Markdown
View as Markdown
Generated from the platform code - always matches what the theme engine allows.
Each page type is drawn from a JSON template in templates/. The template lists the sections of the page; every section on the page sees the variables below. See Templates for the template format.
Global variables#
Available on every page, in the layout, in every section and block.
Variable
Type
Description
shop
shop
The store.
settings
hash
Values of the theme settings (config/settings_schema.json), resolved.
cart
cart
An empty cart outside the cart page - pages are cached for everyone, read the live cart with /cart.js.
template
string
The page type, for example product - for a class on <body>.
template_suffix
string
The alternate template in use (mask for product.mask.json, books for category.books.json), null for the default one.
page_title
string
The title of the page content, without the store name.
seo_title
string
The full document title from the store's SEO templates. The platform puts it in <title> for you.
content_for_header
html
Layout only. Platform markup for <head>: meta tags, canonical, Open Graph, the section stylesheet, preconnects, scripts the merchant added. Print it in <head>.
content_for_layout
html
Layout only. The rendered sections of the page template.
index#
Template: templates/index.json
Address: /
Variable
Type
Description
products
list of product
The store's offers, as sorted and limited in the store's product settings.
articles
list of article
The three latest blog posts.
categories
list of category
The top-level store categories.
product#
Template: templates/product.json
Address: /products/<handle>/
Alternate templates: product.<suffix>.json - the merchant picks the template on the offer.
Variable
Type
Description
product
product
The offer. Its reviews and optionFields are filled only here.
recommendations
list of product
Up to eight offers from the same store categories, filled up with the newest.
category#
Template: templates/category.json
Address: /categories/<handle>/
Alternate templates: category.<suffix>.json - the merchant picks the template on the category. Subcategories keep their own choice.
Variable
Type
Description
category
category
The category, with children, siblings, filters and the offers of this page.
products
list of product
The offers of the current page.
pagination
hash
page, pages, total and per_page.
sort
string
The sort in use.
sort_options
list of string
Sorts a customer can choose: newest, popularity, rating, price_asc, price_desc, name.
page#
Template: templates/page.json
Address: /<path>/
Alternate templates: page.<last segment of the path>.json - /contact-us/ uses page.contact-us.json when the theme has it.
Variable
Type
Description
page
page
The content page.
blog#
Template: templates/blog.json
Address: /blog/ and /blog/<category path>/
Variable
Type
Description
blog
blog
The blog.
blog_category
blog_category
The category on a category page, null on the blog home.
articles
list of article
The posts of the current page.
pagination
hash
page, pages, total and per_page.
sort
string
The sort in use.
article#
Template: templates/article.json
Address: /blog/<handle>/
Variable
Type
Description
blog
blog
The blog.
article
article
The post.
articles
list of article
Related posts.
previous_article
article
The older neighbour, null for the first post.
next_article
article
The newer neighbour, null for the latest post.
terms#
Template: templates/terms.json
Address: /<feature page>/
Alternate templates: terms.<feature code>.json - for example terms.authors.json.
Variable
Type
Description
feature
feature
The feature index - values, alphabet, search and pagination.
term#
Template: templates/term.json
Address: /<feature prefix>/<handle>/
Alternate templates: term.<feature code>.json.
Variable
Type
Description
term
term
The value with its offers and listing filters.
pagination
hash
page, pages, total and per_page.
sort
string
The sort in use.
search#
Template: templates/search.json
Address: /search/?q=<terms>
Variable
Type
Description
search
hash
terms, performed, resultsCount, productsCount, products, pages and articles (pages and posts on the first page only).
products
list of product
The matching offers of the current page.
pagination
hash
page, pages, total and per_page.
sort
string
The sort in use - relevance by default.
sort_options
list of string
relevance and the category sorts.
cart#
Template: templates/cart.json
Address: /cart/
Variable
Type
Description
cart
cart
The visitor's cart. This page is never cached.
Template: templates/contact.json
Address: /contact/
Only the global variables.
404#
Template: templates/404.json
Address: any unknown store address
Only the global variables.