colorbox-formatter.html.twig in Colorbox 8
Default theme implementation to display a formatted colorbox image field.
Available variables:
- image: A collection of image data.
- url: An URL the image can be linked to.
- attributes: Link attributes.
See also
1 theme call to colorbox-formatter.html.twig
- ColorboxFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ ColorboxFormatter.php - Builds a renderable array for a field value.
File
templates/colorbox-formatter.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display a formatted colorbox image field.
- *
- * Available variables:
- * - image: A collection of image data.
- * - url: An URL the image can be linked to.
- * - attributes: Link attributes.
- *
- * @see template_preprocess_colorbox_formatter()
- *
- * @ingroup themeable
- */
- #}
-
- <a href="{{ url }}" aria-controls="colorbox" aria-label="{{ attributes['data-cbox-img-attrs']|raw }}" role="button" {{ attributes }}>{{ image }}</a>