Same filename and directory in other branches
  1. 8.x-1.x templates/colorbox-formatter.html.twig 1 comment

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

template_preprocess_colorbox_formatter()

1 theme call to colorbox-formatter.html.twig
ColorboxFormatter::viewElements in src/Plugin/Field/FieldFormatter/ColorboxFormatter.php

File

templates/colorbox-formatter.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a formatted colorbox image field.
  5. *
  6. * Available variables:
  7. * - image: A collection of image data.
  8. * - url: An URL the image can be linked to.
  9. * - attributes: Link attributes.
  10. *
  11. * @see template_preprocess_colorbox_formatter()
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. <a href="{{ url }}" aria-controls="colorbox" aria-label="{{ attributes['data-cbox-img-attrs']|raw }}" role="button" {{ attributes }}>{{ image }}</a>