You are here

facets-summary-facet.html.twig in Facets 8

Default theme implementation to display source summary facet item.

Accepts suggestions as: facets-source-summary-facet--{facet_id}.

Available variables:

  • label: The label configured by the user.
  • separator: The separator user to concatenate facet active items.
  • items: An array of associative arrays, each having 2 keys: label, count.
  • facet_id: The facet id.
  • facet_admin_label: The facet administrative label.

File

modules/facets_summary/templates/facets-summary-facet.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display source summary facet item.
  5. *
  6. * Accepts suggestions as: facets-source-summary-facet--{facet_id}.
  7. *
  8. * Available variables:
  9. * - label: The label configured by the user.
  10. * - separator: The separator user to concatenate facet active items.
  11. * - items: An array of associative arrays, each having 2 keys: label, count.
  12. * - facet_id: The facet id.
  13. * - facet_admin_label: The facet administrative label.
  14. */
  15. #}
  16. <span class="source-summary-item source-summary-item-{{ facet_id | replace({"_": "-"}) }}">
  17. {% if items %}
  18. {{ label }}: {{ items|safe_join(separator) }}
  19. {% endif %}
  20. </span>