I am working on a field template to display images in a carousel (I'm using BootStrap). My field is named “galerie”
I copied field.html.twig from the core and saved it as field--field-galerie.html.twig
I managed successfuly to add the necessary markup for BootStrap carousel to work.
The wrapping markup displaying the carousel and its control shows up when there is only one image. I thought it would not. It opens after a {% if multiple %}{% if multiple %}
condition and closes before the {% else %}{% else %}
.
My understanding is that {% if multiple %}{% if multiple %}
only checks if the field is set to accept multiple values.
I don't know how to write an condition in twig checking if the field contains one image or more, to trigger (or not) the carousel thingee.