Skip to Content

Global

The global object provides access to all global objects and settings available in your store’s Liquid environment. These objects can be accessed from any file in your theme and are essential for building dynamic storefronts.

Usage Example

{%- comment -%} Access the main navigation menu and render its links {%- endcomment -%} {% assign menu = linklists['main'] %} <ul> {% for link in menu %} <li><a href="{{ link.url }}">{{ link.title }}</a></li> {% endfor %} </ul> {%- comment -%} Show the current page title {%- endcomment -%} <title>{{ page_title }}</title> {%- comment -%} Show the signed-in customer's name {%- endcomment -%} {% if customer %} <p>Welcome, {{ customer.name }}!</p> {% endif %}

Properties

rendered_partial

Returns the partial that is being rendered. For example, if the partial is product section, it will return ‘sections/product’. This is only defined when rendering a partial and not in full page render.

submitted_form

Returns last form submission result and data.

Input

{{ submitted_form.id }} {{ submitted_form.error }} {{ submitted_form.posted_successfully? | yepnope: 'yes', 'no' }}

Output

login email no

routes

Returns the routes object which provides URLs for the endpoints needed in the store.

cart

Returns the cart object.

store

Returns the store object.

wishlist

Returns the wishlist object. Returns false is customer is not signed in.

request

Returns the information about the current request to page, like host or the current URL.

template

Returns information about the current template used at the page.

current_page

Returns the current page number when a product category is paged.

page_title

Returns the title for the current page.

<title>{{ page_title }}</title>

Returns the powered by link.

{{ powered_by_link }}

country_option_tags

Lists all the available country options. Country regions are rendered in regions data attribute.

Input

<select name="country"> {{ country_option_tags }} </select>

Output

<select name="country"> <option value="fi" data-regions='[]''>Suomi</option> <option value="us" data-regions='[["al", "Alabama"],..]'>United States</option> </select>

linklists

Returns the linklists for the current store.

{% assign menu = linklists['main'] %} {% for link in menu %} {% comment %}do something with the link{% endcomment %} {% endfor %}

customer

Access the signed in customer information.

product_groups

Access information about the product groups in the store.

manufacturers

Returns an array of manufacturers in the store.

blog

Access the store’s blog.

pages

List available pages in the store.

products

Access common lists and specific products in the store. To list all products, see catalog.

catalog

Access the product catalog of the store.

settings

Access theme settings.

available_order_statuses

Lists available order statuses.

available_return_statuses

Lists available return statuses.

available_return_reasons

Lists available return reasons.

session

Access information about the current session

has_additional_checkout_buttons

Returns whether there are any additional offsite checkout buttons. These are buttons that are not part of the standard checkout flow.

content_for_additional_checkout_buttons

Returns the content for the additional offsite checkout buttons. These are buttons that are not part of the standard checkout flow.

has_payment_options

Returns whether there are any payment options.

content_payment_option_banners

Returns the content for the payment options banners.

content_for_financing_offers

Returns whether there are any financing offers for the cart. To see product level financing offers, use the product variant drop.

content_for_financing_offers

Returns the content for the financing offers. To see product level financing offers, use the product variant drop.

additional_authentication_flows

Returns whether there are any additional authentication flows.

content_for_additional_authentication_flows

Returns the content for additional authentication.