You are here

details.html.twig in Zircon Profile 8.0

Theme override for a details element.

Available variables

  • attributes: A list of HTML attributes for the details element.
  • errors: (optional) Any errors for this details element, may not be set.
  • title: (optional) The title of the element, may not be set.
  • description: (optional) The description of the element, may not be set.
  • children: (optional) The children of the element, may not be set.
  • value: (optional) The value of the element, may not be set.

File

core/themes/stable/templates/form/details.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for a details element.
  5. *
  6. * Available variables
  7. * - attributes: A list of HTML attributes for the details element.
  8. * - errors: (optional) Any errors for this details element, may not be set.
  9. * - title: (optional) The title of the element, may not be set.
  10. * - description: (optional) The description of the element, may not be set.
  11. * - children: (optional) The children of the element, may not be set.
  12. * - value: (optional) The value of the element, may not be set.
  13. *
  14. * @see template_preprocess_details()
  15. */
  16. #}
  17. <details{{ attributes }}>
  18. {%- if title -%}
  19. <summary{{ summary_attributes }}>{{ title }}</summary>
  20. {%- endif -%}
  21. {% if errors %}
  22. <div>
  23. {{ errors }}
  24. </div>
  25. {% endif %}
  26. {{ description }}
  27. {{ children }}
  28. {{ value }}
  29. </details>