filter_ value
A specific value of a filter.
To learn about supporting filters in your theme, refer to Support storefront filtering.
Properties
Returns
true
if the value is currently active. Returnsfalse
if not.Can only return
true
for filters of typeboolean
orlist
.The number of results related to the filter value.
Returns a value only for
boolean
andlist
type filters. Returnsnil
fortype filters.
The visual representation of the filter value when an image is used.
Returns an image drop for the filter value. Requires the filter presentation to be
image
and for an image to be available. Otherwise, returnsnil
.The customer-facing label for the filter value. For example,
Red
orRouge
.Returns a value only for
boolean
andlist
type filters. Returnsnil
fortype filters.
The URL parameter for the parent filter of the filter value.
For example,
filter.v.option.color
.Filters of type
include an extra component depending on whether the filter value is for the filter's
or
. The following table outlines the URL parameter for each:
Value type URL parameter filter.v.price.gte
filter.v.price.lte
The visual representation of the filter value when a swatch is used.
Returns a swatch drop for the filter value. Requires the filter presentation to be
swatch
and saved color or image content for the swatch. Otherwise, returnsnil
.The current page URL with the filter value parameter added.
NoteAny pagination URL parameters are removed.
The current page URL with the filter value parameter removed.
NoteAny pagination URL parameters are also removed.