You are here

cshs.html.twig in Client-side Hierarchical Select 8.2

Same filename and directory in other branches
  1. 8.3 templates/cshs.html.twig
  2. 8 templates/cshs.html.twig

Default theme implementation for a CSHS select element.

Available variables:

  • attributes: HTML attributes for the select tag.
  • options: The option element children.

See also

cshs_theme()

File

templates/cshs.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a CSHS select element.
  5. *
  6. * Available variables:
  7. * - attributes: HTML attributes for the select tag.
  8. * - options: The option element children.
  9. *
  10. * @see cshs_theme()
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. <select{{ attributes }}>
  16. {% for option in options %}
  17. <option value="{{ option.value }}" data-parent="{{ option.parent }}"{{ option.selected ? ' selected="selected"' }}>
  18. {{ option.label }}
  19. </option>
  20. {% endfor %}
  21. </select>