You are here

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.

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>