{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #} {# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #} {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #} {# We need the raw value here (an array because the extensions handle the public_url() prefix #} {% set images = field.value %} {% if images is not iterable %} {% set images = [images] %} {% endif %} {# Check if we want to display one image or multiple ones #} {% if field.customOption('first_image_only') == true %} {% set images = images|slice(0, 1) %} {% endif %} {% for image in images %} {% if image is not empty %} {% set html_id = 'ea-lightbox-' ~ field.uniqueId ~ '-' ~ loop.index %} {{ entity.instance.name ?? '' }}
{{ entity.instance.name ?? '' }}
{% endif %} {% endfor %}