{{ data }} plus the stored field value types (text, date, toggle, dictionary, fieldset, and more). A custom field may also hold a Content object.
{{ data }} holds the custom field values on an owner such as an entity. Those fields are also properties of the owner, so {{ article.hero }} and {{ article.data.hero }} are the same value. Use .data when you need the bag itself.
A custom field value is polymorphic. Use object_type to tell which implementing type you have. This page catalogs {{ data }} and the dedicated stored-value types. A field can also hold a Content object (for example {{ entity }}, {{ article }}, or {{ image }}); those stay documented under Content.
These stored-value types are distinct from Simple Object Types (string, number, boolean) and from Form Fields used to render HTML controls.
Fieldsets group related child values on one owning entity, either as a single composite or as a repeating list of child objects. Access known field_ids, guard optional content with is_valid, and iterate repeating entries; do not output the whole fieldset as page content.
Which of those two shapes you have is set by the field definition and reported by allow_multiple. When allow_multiple is false the fieldset holds one child object: read its known field_ids directly, or walk fields. When allow_multiple is true it holds an ordered list: iterate the fieldset itself or objects, and treat each entry as one child object carrying the configured child fields, not as another fieldset. Editors can reorder the entries of a repeating fieldset, so render them in the order they arrive rather than assuming a fixed position for any one entry.
{{ data }}
The bag of custom field values on an owner such as an entity. Custom fields are also exposed as properties of that owner, so article.hero and article.data.hero are the same value. Use .data when you need the bag itself (enumerate, copy, or inspect).
Will be true if data contains one or more custom properties
*
object
A custom field value accessed by field_id, using data.field_id or data['field-id']. Each value is one of the stored-value types on this page, or a Content object such as an entity or image
JSON representation of the current data object, identical to {{ data | inspect: 4, false }}
Prefer the promoted properties on the owner for ordinary output. {% for value in data %} walks the custom field values, not the field_id names. Data objects are copyable using the {% copy_to_dictionary %} method; the keys are field_ids and the values are the corresponding field value objects. Some non-entity objects also expose a data bag of named custom values.
The raw unencoded value of the field - outputting the raw value may have unexpected results if the value contains any HTML characters (ie: <, >, ', or ")
The html encoded text of the field. Line breaks in the textarea are converted to "<br />" tags. May include additional markup in the editor preview to make it easier to edit content
Allows any input, but encodes it as text prior to displaying it.
ExampleOutput an entity textarea fieldOutput or validate an entity textarea field value; check is_valid when the field may be empty.
The raw stored value of the field, which is a JSON array string such as ["first","second"]. For textlist fields you do not typically care about this - use values or iterate the field instead
The values of this field joined together with a comma and a space. May include additional markup in the editor preview to make it easier to edit content
Field containing multiple text values stored in one field, such as a list of email addresses. The field is itself a list of strings: iterate it with a {% for %} loop, index it directly with textlist[0], and use the list symbols first, last, and size on it. Iterating the field yields the same strings as values, so reach for values only when you want the list as its own object. Guard optional content with is_valid, or check count, before rendering. The field definition decides how many values an editor may enter and may drop duplicate entries, but at runtime the field simply exposes the values that were saved.
Delimited string containing the values from all of the selected options. For select fields you do not typically care about this - use selected or values instead
The default value for this field if no value is specified
options
object
Contains all of the available options for this select list. Each option is a property on the object where they property key is the option value and the property value is the option text
Delimited string containing the values from all of the checked checkboxes. For checkboxlist fields you do not typically care about this - use selected or values instead
The default value for this field if no value is specified
options
object
Contains all of the available options for this checkboxlist. Each option is a property on the object where they property key is the option value and the property value is the option text
Same as value - except that output is clickable in the preview site while value is not. May include additional markup in the editor preview to make it easier to edit content
Allows any valid HTML input. May also include <liquid-markup> tags.
The value as it was input by the user, which is the same as the value property. May include additional markup in the editor preview to make it easier to edit content
Contains code - which may be any of CSS, Javascript, Liquid Markup, JSON objects, or any other type of code. This code is not evaluated or processed before being output. Use with extreme caution.
{{ labels }}
Field containing a list of key-value pairs where the keys are not necessarily unique
A comma-delimited list of all of the key-value pairs in this field using the form "key1:value1,key2:value2,etc..." For labels fields you do not typically care about this - use values instead
Same as value. May include additional markup in the editor preview to make it easier to edit content
Field containing a list of key-value pairs where the keys are not necessarily unique. You may also treat this object as a list containing all of the key-value pairs which may be iterated using a {% for %} loop. For more details, see the examples below:
ExampleList all keys, values, and objects in fieldsIterate over dictionary fields (keys/values), labels fields (Key/Value pairs), and fieldset fields (objects or individual values). See also list-all-cookies and list-all-custom-properties for related patterns.
Dictionary field: keys and values
Liquid
<ul>
{%- for key in entity.dictionary_field %} --equivalent to {% for key in entity.dictionary_field.keys -%}
<li><strong>{{key}}</strong> = {{entity.dictionary_field.values[key]}}</li>
{%- endfor -%}
</ul>
Labels field: keys and values
Liquid
<ul>
{%- for kvp in entity.labels -%}
<li><strong>{{kvp.Key}}</strong> = {{kvp.Value}}</li>
{%- endfor -%}
</ul>
Fieldset field: all objects
Liquid
{%- if entity.fieldset.is_valid and entity.fieldset.allow_multiple -%}
<ul>
{%- for object in entity.fieldset %} --equivalent to {% for object in entity.fieldset.objects -%}
<li><strong>{{ object.custom_title }}</strong>{% if object.custom_description.is_valid %}<br />
{{- object.custom_description }}{% endif %}</li>
{%- endfor -%}
</ul>
{%- endif -%}
Fieldset field: all values
Liquid
{%- if entity.fieldset.is_valid -%}
{%- unless entity.fieldset.allow_multiple -%}
<ul>
{%- for field in entity.fieldset %} --equivalent to {% for field in entity.fieldset.fields -%}
<li><strong>{{field.field_id}}</strong> = {{field.output}}</li>
{%- endfor -%}
</ul>
{%- endunless -%}
{%- endif -%}
{{ fieldset }}
A group of related child fields exposed as either one structured custom object or a repeating list of child custom objects.
True when the fieldset is repeating. A repeating fieldset exposes child custom objects through objects and iteration; a non-repeating fieldset exposes one custom object through fields and direct child access.
An inspection representation of the fieldset. Render the relevant child fields or child custom objects for production output.. May include additional markup in the editor preview to make it easier to edit content
A fieldset keeps related values together inside one owning entity. When allow_multiple is false, access known child FieldIDs directly (object.keyName or object["keyName"]) or through fields (object.fields.keyName or object.fields["keyName"]); iterating the fieldset or fields yields the individual child field objects. When allow_multiple is true, iterate the fieldset or objects to receive one child custom object per entry, then access that object's named child fields. A repeated item is a child custom object, not another fieldset. Guard optional content with is_valid before rendering. Use inspect during development when the runtime shape is unfamiliar, but do not use the fieldset's raw inspection representation as the production UI.
ExampleAccess fields in a single-object fieldsetGuard a non-repeating fieldset, then access known child FieldIDs directly, through fields, or with bracket notation.
Access a known child directly
Liquid
{%- if entity.fieldset.is_valid and entity.fieldset.field1.is_valid -%}
<p>Field 1 Value: {{ entity.fieldset.field1 }}</p>
{%- endif -%}
For a non-repeating fieldset, a known child FieldID can be accessed directly. The selected value remains its documented child field type.
Access a child through fields
Liquid
{%- if entity.fieldset.is_valid and entity.fieldset.fields.field2.is_valid -%}
<p>Field 2 Value: {{ entity.fieldset.fields.field2 }}</p>
{%- endif -%}
The fields property makes the single-object shape explicit while returning the same documented child field type.
Use bracket notation when needed
Liquid
{%- if entity.fieldset.is_valid and entity.fieldset['field-with-hyphens'].is_valid -%}
<p>Field Value: {{ entity.fieldset['field-with-hyphens'] }}</p>
{%- endif -%}
Use bracket notation when a FieldID is not suitable for dot notation. The selected value still keeps its documented child field type.
ExampleRender repeating fieldset objectsGuard a repeating fieldset, iterate its child custom objects, and render named child fields from each entry.
Liquid
{%- if entity.whyus_reasons.is_valid -%}
<ul>
{%- for reason in entity.whyus_reasons -%}
<li>
<strong>{{ reason.title }}</strong>
{%- if reason.description.is_valid -%}
<div>{{ reason.description }}</div>
{%- endif -%}
</li>
{%- endfor -%}
</ul>
{%- endif -%}
ExampleInspect a fieldset during developmentUse bounded inspection to understand or troubleshoot an unfamiliar fieldset before writing intentional child-field output.
ExampleList all keys, values, and objects in fieldsIterate over dictionary fields (keys/values), labels fields (Key/Value pairs), and fieldset fields (objects or individual values). See also list-all-cookies and list-all-custom-properties for related patterns.
Dictionary field: keys and values
Liquid
<ul>
{%- for key in entity.dictionary_field %} --equivalent to {% for key in entity.dictionary_field.keys -%}
<li><strong>{{key}}</strong> = {{entity.dictionary_field.values[key]}}</li>
{%- endfor -%}
</ul>
Labels field: keys and values
Liquid
<ul>
{%- for kvp in entity.labels -%}
<li><strong>{{kvp.Key}}</strong> = {{kvp.Value}}</li>
{%- endfor -%}
</ul>
Fieldset field: all objects
Liquid
{%- if entity.fieldset.is_valid and entity.fieldset.allow_multiple -%}
<ul>
{%- for object in entity.fieldset %} --equivalent to {% for object in entity.fieldset.objects -%}
<li><strong>{{ object.custom_title }}</strong>{% if object.custom_description.is_valid %}<br />
{{- object.custom_description }}{% endif %}</li>
{%- endfor -%}
</ul>
{%- endif -%}
Fieldset field: all values
Liquid
{%- if entity.fieldset.is_valid -%}
{%- unless entity.fieldset.allow_multiple -%}
<ul>
{%- for field in entity.fieldset %} --equivalent to {% for field in entity.fieldset.fields -%}
<li><strong>{{field.field_id}}</strong> = {{field.output}}</li>
{%- endfor -%}
</ul>
{%- endunless -%}
{%- endif -%}
{{ dictionary }}
Object containing a list of key-value pairs where the keys are unique.
True if properties can be added or removed from this dictionary. This will only be true if the dictionary was created using the {% create_dictionary %} method
The JSON representation of the values. May include additional markup in the editor preview to make it easier to edit content
Individual dictionary values may be accessed using the {{ dictionary.keyName }}, {{ dictionary["keyName"] }}, {{ dictionary.values.keyName }}, or dictionary.values["keyName"] syntax. You may also treat this object as a list containing all of the keys which may be iterated using a {% for %} loop.
ExampleList all keys, values, and objects in fieldsIterate over dictionary fields (keys/values), labels fields (Key/Value pairs), and fieldset fields (objects or individual values). See also list-all-cookies and list-all-custom-properties for related patterns.
Dictionary field: keys and values
Liquid
<ul>
{%- for key in entity.dictionary_field %} --equivalent to {% for key in entity.dictionary_field.keys -%}
<li><strong>{{key}}</strong> = {{entity.dictionary_field.values[key]}}</li>
{%- endfor -%}
</ul>
Labels field: keys and values
Liquid
<ul>
{%- for kvp in entity.labels -%}
<li><strong>{{kvp.Key}}</strong> = {{kvp.Value}}</li>
{%- endfor -%}
</ul>
Fieldset field: all objects
Liquid
{%- if entity.fieldset.is_valid and entity.fieldset.allow_multiple -%}
<ul>
{%- for object in entity.fieldset %} --equivalent to {% for object in entity.fieldset.objects -%}
<li><strong>{{ object.custom_title }}</strong>{% if object.custom_description.is_valid %}<br />
{{- object.custom_description }}{% endif %}</li>
{%- endfor -%}
</ul>
{%- endif -%}
Fieldset field: all values
Liquid
{%- if entity.fieldset.is_valid -%}
{%- unless entity.fieldset.allow_multiple -%}
<ul>
{%- for field in entity.fieldset %} --equivalent to {% for field in entity.fieldset.fields -%}
<li><strong>{{field.field_id}}</strong> = {{field.output}}</li>
{%- endfor -%}
</ul>
{%- endunless -%}
{%- endif -%}
ExampleCreate a settings dictionary (key-value map)Build a settings dictionary (key-value map) and use it for configuration or display.
ExampleReference dictionary field properties in multiple waysReference dictionary field properties with dot notation, bracket notation, or keys/values iteration.
<ul>
{%- for field in entity.dictionary_field.keys -%}
<li><strong>{{ field }}</strong> = {{ entity.dictionary_field.values[field] }}</li>
{%- endfor -%}
</ul>
Output an unordered list containing all of the dictionary field properties and their values by enumerating the keys property.
List all dictionary fields from the dictionary object
Liquid
<ul>
{%- for field in entity.dictionary_field -%}
<li><strong>{{ field }}</strong> = {{ entity.dictionary_field[field] }}</li>
{%- endfor -%}
</ul>
Directly enumerating the dictionary object is the same as enumerating the keys property, so this example is functionally identical to the previous example.
The value formatted using the "Short date pattern" (MM/dd/yyyy). May include additional markup in the editor preview to make it easier to edit content
Field used to store a date. All dates are stored in UTC time.
ExampleUse a post_date or date-time field with the date filterUse a post_date or other date-time field and format or compare it with the date filter and date properties.
Liquid
{%- if entity.rehearsal_start.is_valid -%}
<p>Rehearsal will begin on {{ entity.rehearsal_start | date: "MMMM dd, yyyy 'at' h:m t" }} UTC</p>
{%- endif -%}
Delimited string containing the values from all of the selected options. For objecttype fields you do not typically care about this - use values instead