file-audio.html.twig
Same filename in this branch
Theme override to display the file entity as an audio tag.
Available variables:
- attributes: An array of HTML attributes, intended to be added to the audio tag.
- files: And array of files to be added as sources for the audio tag. Each
element is an array with the following elements:
- file: The full file object.
- source_attributes: An array of HTML attributes for to be added to the source tag.
File
-
core/
themes/ stable9/ templates/ field/ file-audio.html.twig
View source
- {#
- /**
- * @file
- * Theme override to display the file entity as an audio tag.
- *
- * Available variables:
- * - attributes: An array of HTML attributes, intended to be added to the
- * audio tag.
- * - files: And array of files to be added as sources for the audio tag. Each
- * element is an array with the following elements:
- * - file: The full file object.
- * - source_attributes: An array of HTML attributes for to be added to the
- * source tag.
- */
- #}
- <audio {{ attributes }}>
- {% for file in files %}
- <source {{ file.source_attributes }} />
- {% endfor %}
- </audio>