You are here

cshs-term-group.html.twig in Client-side Hierarchical Select 8.3

Theme for "Group by root" formatter.

Available variables:

  • id: The ID of a root term.
  • title: Title of a group.
  • terms: Children terms.

See also

cshs_theme()

File

templates/cshs-term-group.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme for "Group by root" formatter.
  5. *
  6. * Available variables:
  7. * - id: The ID of a root term.
  8. * - title: Title of a group.
  9. * - terms: Children terms.
  10. *
  11. * @see cshs_theme()
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. <div class="cshs-term-group">
  17. <div class="cshs-term-group__title" data-id="{{ id }}">
  18. {{ title }}
  19. </div>
  20. {% if terms is not empty %}
  21. <ul class="cshs-term-group__terms">
  22. {% for term in terms %}
  23. <li class="cshs-term-group__term" data-id="{{ term.id }}" data-parent="{{ term.parent }}">
  24. {{ term.label }}
  25. </li>
  26. {% endfor %}
  27. </ul>
  28. {% endif %}
  29. </div>