You are here

facets-result-item.html.twig in Facets 8

Default theme implementation of a facet result item.

Available variables:

  • value: The item value.
  • raw_value: The raw item value.
  • show_count: If this facet provides count.
  • count: The amount of results.
  • is_active: The item is active.
  • facet: The facet for this result item.
    • id: the machine name for the facet.
    • label: The facet label.

File

templates/facets-result-item.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation of a facet result item.
  5. *
  6. * Available variables:
  7. * - value: The item value.
  8. * - raw_value: The raw item value.
  9. * - show_count: If this facet provides count.
  10. * - count: The amount of results.
  11. * - is_active: The item is active.
  12. * - facet: The facet for this result item.
  13. * - id: the machine name for the facet.
  14. * - label: The facet label.
  15. *
  16. * @ingroup themeable
  17. */
  18. #}
  19. {% if is_active %}
  20. <span class="facet-item__status js-facet-deactivate">(-)</span>
  21. {% endif %}
  22. <span class="facet-item__value">{{ value }}</span>
  23. {% if show_count %}
  24. <span class="facet-item__count">({{ count }})</span>
  25. {% endif %}