Global objects are special variables which are available across EvenCart theme. They can be used just like any other liquid object.
The following Global objects are available in EvenCart.
Object Name | Description | Fields |
---|---|---|
breadcrumb | Stores the breadcrumb array of the current page | See Fields |
cart | Represents the cart of the current user | See Fields |
currentUser | Represents the current user | See Fields |
navigation | Stores the navigation of the website | See Fields |
store | Represents the current store | See Fields |
How to use Global Objects?
The usage of global object properties is similar to any other liquid object. The names of objects and properties are always camel case.
Examples
<!--Display the name of store -->
{{store.name}}
<!--To display different strings for logged in and non logged in users-->
{% if currentUser.isVisitor %}
<p>{{"Login and you can do a lot more..."}}</p>
{% else %}
<p>
{{"Welcome "}} {{currentUser.name}}
</p>
{% endif %}