Objects
An Object represents a certain record (from the Plate database) inside Liquid. You can call attributes on an object. E.g. to get the current site’s name, you’d call the attribute name
on the object site
:
Input:
{{ site.name }}
Output:
A beautiful site
Available objects
Some objects are globally available, and some only in certain theme files. Globally available objects are:
Site
Post
Request
Breadcrumbs
Go to the Objects page to read the docs on Objects.
Objects contain attributes that you can call in theme files. These attributes are mostly set by you (Content Fields), and filled with a value by the user. To call the object’s attribute, (E.g. a post
’s title
) you call it like a variable (wrapped in {{
and }}
).
Input:
{{ post.title }}
Output:
In the list below you’ll find documentation on the object’s default attributes. But after adding a Content Fields, the resulting attributes are called in the same way.
Calling attributes using dynamic names
Part of liquid functionality is that you can also call attributes by using brackets. This will allow you to call dynamic variable names on an object:
Input:
Output: