Skip to content

sellerlane_query_state

sellerlane.query_state exposes only the public search query, resource type, and sort key needed by no-JavaScript search and filter forms. It deliberately does not expose the complete query map, cookies, headers, CSRF values, preview capabilities, or middleware-owned request state.

Example

<form action="{{ routes.search_url }}" method="get">
<input type="search" name="q" value="{{ sellerlane.query_state.q | escape }}">
{% if sellerlane.query_state.type %}
<input type="hidden" name="type" value="{{ sellerlane.query_state.type | escape }}">
{% endif %}
{% if sellerlane.query_state.sort_by %}
<input type="hidden" name="sort_by" value="{{ sellerlane.query_state.sort_by | escape }}">
{% endif %}
<button type="submit">Search</button>
</form>

Each value is a scalar string capped at 2,048 characters. A missing or empty value returns nil. The Drop preserves public URL state; it does not validate that type or sort_by is supported by the current resource. Let the route that receives the form apply its own allowlist. See Liquid data boundaries for the request-data trust boundary.

Properties

PropertyDescription
sellerlane_query_state.qPublic search query, or nil.
sellerlane_query_state.sort_byPublic sort key, or nil.
sellerlane_query_state.typePublic search resource type, or nil.

Property list is generated from the storefront engine (SellerlaneQueryStateDrop), so it always matches what your theme can use. Use {{ sellerlane.query_state | json }} only as a curated debug snapshot; it can omit lazy or otherwise public properties.