Shopify/Liquid Object Syntax

How to get an object value on a template file

Written By Guilherme de Andrade Arantes (Administrator)

Updated at May 20th, 2020

In order to display the object value, you'll need to make sure it's inside the brackets markup as the following example:

<h1>{{ }}</h1>

This would output "Shopify/Liquid Object Syntax" on this specific page.

Wrong Syntax:

<h1>{% %}</h1>
<h1>{{ </h1>}}

The above examples wouldn't work and no output would be displayed.

Real Liquid Example

This example is from a Standard Helpjuice Theme live on our Theme Library:

<article class="main_content">
  <h1 class="page_title">{{ }}</h1>

  <p class="page_description">
    {{ question.description }}

  <div class="page_content">
    {{ question.answers.first.cleaned_body }}

Liquid Filters

You can apply filters on the Liquid Statements. Every time you need to limit a loop statement or change the output of an object value, you can rely on Liquid Filters. Check the Shopify/Liquid Filter Syntax article.‍

Objects List:

You can find the complete object reference at Shopify/Liquid Complete Objects Reference

Was this article helpful?