Liquid Tags
On this page
Liquid tags use the {% %} syntax and perform actions rather than output values. StoreConnect extends standard Liquid with its own set of tags covering template structure, data access, HTTP responses, caching, and more.
Tags come in two forms:
- Simple tags — a single self-contained tag:
{% tag_name options %} - Block tags — an opening and closing pair that wrap content:
{% tag_name options %}...{% endtag_name %}
Template structure
- Layout - Liquid Tag Reference — specifies which layout template wraps the current page
- Render - Liquid Tag Reference — renders a snippet template with optional parameters
- Component - Liquid Tag Reference — renders a reusable component with support for lazy loading and event-based reload
- Require - Liquid Tag Reference — includes a CSS or JavaScript resource, deduplicated across the page
- Resource Path - Liquid Tag Reference — outputs the resolved path to a theme resource
Variables & data
- Default - Liquid Tag Reference — sets default values for variables not already defined in the template context
- Variables - Liquid Tag Reference — declares and initializes multiple template variables in one place
- New - Liquid Tag Reference — creates new objects: UUID, List, Map, or random number
- Struct - Liquid Tag Reference — creates a typed, schema-validated data structure
- Session - Liquid Tag Reference — persists variables in the user’s session across requests
- Context - Liquid Tag Reference — defines context variables available within a component template
Querying records
- Query - Liquid Tag Reference — fetches Salesforce records from within a Liquid template; see also Liquid query for full usage guidance
Forms
- Form - Liquid Tag Reference — wraps a form block with a registered form object, making it available as
forminside the block
Pagination & caching
- Paginate - Liquid Tag Reference — paginates a collection or array with configurable page size and window
- Cache - Liquid Tag Reference — caches a block of rendered output for a configurable duration
HTTP responses
These tags are used in Liquid controllers to control the HTTP response.
- Params - Liquid Tag Reference — sets controller parameters
- Respond - Liquid Tag Reference — sends a custom HTTP response from a controller
- Redirect - Liquid Tag Reference — redirects the request to another URL
- Header - Liquid Tag Reference — adds a custom HTTP response header
- Update - Liquid Tag Reference — updates custom data on a Salesforce object
- Action - Liquid Tag Reference — executes a named controller action
Controller lifecycle
These block tags render their content only during a specific phase of a Liquid controller’s execution.
- Before - Liquid Tag Reference — runs in the before phase
- After - Liquid Tag Reference — runs in the after phase
- Final - Liquid Tag Reference — runs in the final phase
API & events
- API - Liquid Tag Reference — makes an outbound HTTP API call from within a template, with the response available inside the block
- Process Event - Liquid Tag Reference — processes an event object and injects its methods into the template context
Debugging
- Debug - Liquid Tag Reference — logs variable values and messages to the session debug output
- Timer - Liquid Tag Reference — measures and logs the execution time of a template block
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.