You are here

file-link-formatter.html.twig in File Link 8

Same filename and directory in other branches
  1. 2.0.x templates/file-link-formatter.html.twig

Default theme implementation of a file_link.

Available variables:

  • link: The link that has already been formatted to include the title.
  • size: The target file size formatted according to formatter settings.
  • format: The file mime-type.

See also

template_preprocess()

File

templates/file-link-formatter.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation of a file_link.
  5. *
  6. * Available variables:
  7. * - link: The link that has already been formatted to include the title.
  8. * - size: The target file size formatted according to formatter settings.
  9. * - format: The file mime-type.
  10. *
  11. * @see template_preprocess()
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. {% apply spaceless %}
  17. {{ link }}
  18. {% if format and size %}
  19. ({{ format }}, {{ size }})
  20. {% endif %}
  21. {% endapply %}