Developers · Liquid
Liquid Objects Introduction
Last updated 1 November 2026
What Liquid objects are on Insites, with the context object and a live example.
An object holds data your template can read. You read a value with a dot, as in {{ object.property }}. On Insites, the most important object is context. It is available in every Liquid file. It holds the request, the signed-in user, the session, constants and more.
The two groups of objects
| Page | Covers |
|---|---|
| Liquid objects: details | The standard objects inside loops, such as forloop and tablerowloop, with the index, position and count of the current item |
| Liquid objects: Insites | The context object, available in pages, partials, layouts and notifications |
Example: read from context
insites-cli exec liquid docs57 "{{ context.environment }}|{{ context.current_user | json }}|{{ context.language }}"
production|null|enThis ran on the docs.insites.io instance on 1 November 2026. The run had no signed-in user, so context.current_user is null.
Commonly used parts of context
| Value | Holds |
|---|---|
context.params | The request parameters, from the address and the form body |
context.current_user | The signed-in user, or null |
context.session | Values stored for this visitor between requests |
context.constants | Constants set on the instance, such as API keys |
context.location | The address of the request |
context.flash | One-time messages, such as context.flash.notice |
context.environment | The environment name, such as production or staging |
Common mistakes
- Printing a constant on a page or into the log while you debug. Constants hold secrets.
- Assuming
context.current_userexists. Check it is not blank before you read from it. - Trusting
context.params. Anyone can send any value; check it before you use it.