You are here

details.html.twig in Zircon Profile 8

Default theme implementation 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/modules/system/templates/details.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation 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. * @ingroup themeable
  17. */
  18. #}
  19. <details{{ attributes }}>
  20. {%- if title -%}
  21. <summary{{ summary_attributes }}>{{ title }}</summary>
  22. {%- endif -%}
  23. {% if errors %}
  24. <div>
  25. {{ errors }}
  26. </div>
  27. {% endif %}
  28. {{ description }}
  29. {{ children }}
  30. {{ value }}
  31. </details>

Related topics