file-video.html.twig

Same filename in this branch
  1. 11.x core/profiles/demo_umami/themes/umami/templates/classy/field/file-video.html.twig
  2. 11.x core/themes/stable9/templates/field/file-video.html.twig
  3. 11.x core/themes/claro/templates/classy/field/file-video.html.twig
  4. 11.x core/modules/file/templates/file-video.html.twig
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/templates/classy/field/file-video.html.twig
  2. 9 core/themes/stable9/templates/field/file-video.html.twig
  3. 9 core/themes/seven/templates/classy/field/file-video.html.twig
  4. 9 core/themes/claro/templates/classy/field/file-video.html.twig
  5. 9 core/themes/bartik/templates/classy/field/file-video.html.twig
  6. 9 core/themes/stable/templates/field/file-video.html.twig
  7. 9 core/themes/starterkit_theme/templates/field/file-video.html.twig
  8. 9 core/themes/classy/templates/field/file-video.html.twig
  9. 9 core/modules/file/templates/file-video.html.twig
  10. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/field/file-video.html.twig
  11. 8.9.x core/themes/seven/templates/classy/field/file-video.html.twig
  12. 8.9.x core/themes/claro/templates/classy/field/file-video.html.twig
  13. 8.9.x core/themes/bartik/templates/classy/field/file-video.html.twig
  14. 8.9.x core/themes/stable/templates/field/file-video.html.twig
  15. 8.9.x core/themes/classy/templates/field/file-video.html.twig
  16. 8.9.x core/modules/file/templates/file-video.html.twig
  17. 10 core/profiles/demo_umami/themes/umami/templates/classy/field/file-video.html.twig
  18. 10 core/themes/stable9/templates/field/file-video.html.twig
  19. 10 core/themes/claro/templates/classy/field/file-video.html.twig
  20. 10 core/themes/starterkit_theme/templates/field/file-video.html.twig
  21. 10 core/modules/file/templates/file-video.html.twig

Default theme implementation to display the file entity as a video tag.

Available variables:

  • attributes: An array of HTML attributes, intended to be added to the video tag.
  • files: And array of files to be added as sources for the video 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/starterkit_theme/templates/field/file-video.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display the file entity as a video tag.
  5. *
  6. * Available variables:
  7. * - attributes: An array of HTML attributes, intended to be added to the
  8. * video tag.
  9. * - files: And array of files to be added as sources for the video tag. Each
  10. * element is an array with the following elements:
  11. * - file: The full file object.
  12. * - source_attributes: An array of HTML attributes for to be added to the
  13. * source tag.
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. {{ attach_library('starterkit_theme/file') }}
  19. <video {{ attributes }}>
  20. {% for file in files %}
  21. <source {{ file.source_attributes }} />
  22. {% endfor %}
  23. </video>

Related topics


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.