You are here

download-file-link.html.twig in File Download 8

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.
  • size: size of file in standard format
  • raw_size: size of file in bytes
  • description: $item->description
  • title: The value applied to the download link anchor tag

File

templates/download-file-link.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. * - size: size of file in standard format
  10. * - raw_size: size of file in bytes
  11. * - description: $item->description
  12. * - title: The value applied to the download link anchor tag
  13. *
  14. * @see template_preprocess_file_link()
  15. *
  16. * @ingroup themeable
  17. */
  18. #}
  19. <span{{ attributes }}>{{ link }}</span>
  20. {% if size %}
  21. <span class="file-download-size">({{ size }})</span>
  22. {% endif %}