{# Construct a facet module populated with links to filtered results. name The field name identifying the facet field, eg. "tags" title The title of the facet, eg. "Tags", or "Tag Cloud" label_function Renders the human-readable label for each facet value. If defined, this should be a callable that accepts a `facet_item`. eg. lambda facet_item: facet_item.display_name.upper() By default it displays the facet item's display name, which should usually be good enough if_empty A string, which if defined, and the list of possible facet items is empty, is displayed in lieu of an empty list. count_label A callable which accepts an integer, and returns a string. This controls how a facet-item's count is displayed. extras Extra info passed into the add/remove params to make the url alternative_url URL to use when building the necessary URLs, instead of the default ones returned by url_for. Useful eg for dataset types. hide_empty Do not show facet if there are none, Default: false. within_tertiary Boolean for when a facet list should appear in the the right column of the page and not the left column. search_facets Dictionary with search facets #} {% block facet_list %} {% set hide_empty = hide_empty or false %} {% with items = items or h.get_facet_items_dict(name, search_facets) %} {% if items or not hide_empty %} {% if within_tertiary %} {% set nav_class = 'nav nav-pills nav-stacked' %} {% set nav_item_class = ' ' %} {% set wrapper_class = 'nav-facet nav-facet-tertiary' %} {% endif %} {% block facet_list_item %}
{% block facet_list_heading %}

{{ title }}

{% endblock %} {% block facet_list_items %} {% with items = items or h.get_facet_items_dict(name, search_facets) %} {% if items %} {% else %}

{{ _('There are no {facet_type} that match this search').format(facet_type=title) }}

{% endif %} {% endwith %} {% endblock %}
{% endblock %} {% endif %} {% endwith %} {% endblock %}