Filter Value
The filter_value
object describes a value for a filter, including its label, count, and URLs for adding or removing the value from the filter.
Usage Example
{%- comment -%} Show filter values for a filter {%- endcomment -%}
<ul>
{% for value in filter.values %}
<li>
<a href="{{ value.url_to_add }}">{{ value.label }}</a>
{% if value.active %}(Active){% endif %}
({{ value.count }})
</li>
{% endfor %}
</ul>
Properties
active
Returns true if this value is active.
count
Returns the result count for this value.
label
Returns the label for this value.
param_name
Returns the value parameter name.
taxonomy_value
Returns the related taxonomy value for this filter value.
url_to_add
Returns the current page URL with the filter value parameter added.
url_to_remove
Returns the current page URL with the filter value parameter removed.
Last updated on