VariableReference
From Shopify Wiki
Following is a reference-list of objects which you can use in your liquid templates. For a introduction to liquid templates you can check out the UsingLiquid page.
Contents |
Requirements
The following variables must be included in your theme's layout file (theme.liquid).
Template specific objects
Special purpose templates usually export the object they reference by the same name as the template file. Product.liquid, for example, would export a product object which references the current product on the page.
index.liquid
This template creates your Shop's frontpage. Its not directly related to any given resource of your Shop in the same way that product.liquid is.
Because of this index.liquid designers usually make use of the global objects referenced below. You are free to use any objects (product, collection, page etc.) in your store from here.
By convention the default themes will render all articles of a blog with handle frontpage if it exist and display products from a collection with handle frontpage. Both those objects are created automatically during the Shopify signup for convenience.
product.liquid
The referenced product with several variants.
blog.liquid
blog which has several article objects.
collection.liquid
collection which references several product and tags objects. Collections usually make use of pagination.
page.liquid
cart.liquid
cart with many line_items
Email templates
All current email templates shown in your Email & Notifications Preferences screen have access to the properties of their respective order.
Shipping notification templates
The Shipping confirmation and Shipping update templates have access to a fulfillment object.
Global objects
The following objects are available from any liquid template in your shop's theme.
