You are here

media-audio-file-formatter.html.twig in Media entity audio 8

Same filename and directory in other branches
  1. 8.2 templates/media-audio-file-formatter.html.twig

Default theme implementation for a link to a file.

Available variables:

  • attributes: The HTML attributes for the containing element.
  • link: A link to the file.

File

templates/media-audio-file-formatter.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a link to a file.
  5. *
  6. * Available variables:
  7. * - attributes: The HTML attributes for the containing element.
  8. * - link: A link to the file.
  9. *
  10. * @see template_preprocess_file_link()
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. <audio {{ extravalue }}>
  16. <source src="{{ media_link }}" type="{{ mimetype }}">
  17. </audio>
  18. {% if value %}
  19. <a href="{{ media_link }}" target="_blank" download>{{ 'Download'|t }}</a>
  20. {% endif %}