Objects are Liquid variables that represent structured data in your theme. They can contain a single value, multiple properties, or even references to other objects. Think of them as containers that organize and provide access to different types of data. There are two main categories of objects available in your theme:
  • Built-in objects: These are predefined global and local objects that come with the system
  • Custom objects: Objects that you create yourself to organize your theme’s data
The availability of objects depends on where you’re using them in your theme files.

Usage

Objects, along with their properties, are wrapped in curly brace delimiters {{ }}. For example, the all_courses object contains a property called name that can be used to output the name of a course.
{{ all_courses["my-course"].name }}
My Course

Object access

The way that you access an object depends on the object and the context in which you want to access it. An object might be accessed in the following ways:
  • Globally: The object can be accessed directly in any theme file.
  • In a template: The object can be accessed directly in specific templates, or in sections or blocks included in the template.
  • Through a parent object: Many objects are returned by another object, or as a property of a parent object.
Refer to each object to learn about how it can be accessed.

Creating custom objects

You can also create your own variables using variable tags. Variables are treated like objects syntactically.
{% assign my_variable = 'My custom string.' %}
{{ my_variable }}
My custom string.

Available objects

Check detailed documentation for each object in the following sections: