You are here

filter-caption.html.twig in Drupal 10

Default theme implementation for a filter caption.

Returns HTML for a captioned image, audio, video or other tag.

Available variables

  • string node: The complete HTML tag whose contents are being captioned.
  • string tag: The name of the HTML tag whose contents are being captioned.
  • string caption: The caption text.
  • string classes: The classes of the captioned HTML tag.

File

core/modules/filter/templates/filter-caption.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a filter caption.
  5. *
  6. * Returns HTML for a captioned image, audio, video or other tag.
  7. *
  8. * Available variables
  9. * - string node: The complete HTML tag whose contents are being captioned.
  10. * - string tag: The name of the HTML tag whose contents are being captioned.
  11. * - string caption: The caption text.
  12. * - string classes: The classes of the captioned HTML tag.
  13. */
  14. #}
  15. <figure role="group"{%- if classes %} class="{{ classes }}"{%- endif %}>
  16. {{ node }}
  17. <figcaption>{{ caption }}</figcaption>
  18. </figure>