filter_value
A filter_value is returned by filter.values, filter.active_values, the
boolean value properties, or a range filter’s minimum and maximum properties.
Its parameter names and URLs use the canonical public storefront-filter grammar.
Example
{% for filter in collection.filters %} <fieldset> <legend>{{ filter.label }}</legend> {% for value in filter.values %} <label> <input type="checkbox" name="{{ value.param_name }}" value="{{ value.value }}" {% if value.active %}checked{% endif %} > {{ value.label }} ({{ value.count }}) </label> {% endfor %} </fieldset>{% endfor %}Use url_to_add and url_to_remove for links and chips. These URLs retain the
active locale and safe query state while resetting the relevant paginator.
Price values are decimal amounts in the storefront currency’s major unit.
Properties
| Property | Description |
|---|---|
filter_value.active | true when this value is selected in the current collection or search view. |
filter_value.count | Number of results associated with the value, or nil for a range bound. |
filter_value.display | Reserved compatibility field; currently nil. |
filter_value.image | Image presentation for the value, or nil unless the parent presentation is image. |
filter_value.label | Buyer-facing value label. |
filter_value.param_name | Canonical public filter parameter name. |
filter_value.sort_order | Seller-configured value position, or nil. |
filter_value.swatch | Color or pattern swatch presentation, or nil unless the parent presentation is swatch. |
filter_value.swatch_color1 | First configured swatch color, or nil. |
filter_value.swatch_color2 | Second configured swatch color, or nil. |
filter_value.swatch_color3 | Third configured swatch color, or nil. |
filter_value.swatch_type | Swatch composition: single, dual, triple, or pattern. |
filter_value.url_to_add | Localized URL that applies this value and resets the relevant paginator. |
filter_value.url_to_remove | Localized URL that removes this value and resets the relevant paginator. |
filter_value.value | Submitted filter value; price bounds are expressed in storefront major currency units. |
filter_value.visual_alt_text | Alternative text for an image or pattern presentation, or nil. |
filter_value.visual_kind | Underlying visual assignment kind: none, swatch, or image. |
filter_value.visual_media | Narrow public visual-media record, or nil. |
See Storefront filtering for complete collection and search forms.
Property list is generated from the storefront engine (FilterValueDrop), so it always matches what your theme can use. Use {{ value | json }} only as a curated debug snapshot; it can omit lazy or otherwise public properties.