file-link-formatter.html.twig in File Link 2.0.x
Same filename and directory in other branches
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
1 theme call to file-link-formatter.html.twig
- FileLinkFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ FileLinkFormatter.php - Builds a renderable array for a field value.
File
templates/file-link-formatter.html.twigView source
- {#
- /**
- * @file
- * 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 template_preprocess()
- *
- * @ingroup themeable
- */
- #}
- {% spaceless %}
- {{ link }}
- {% if format and size %}
- ({{ format }}, {{ size }})
- {% endif %}
- {% endspaceless %}