Component 5: Image List Only Use this if you wish to write your own Twig script for displaying your images, and only need a list of images (that can be found in a given folder) to be loaded into a page variable. The image list component does not have any options other than the Shared Options. Example Page 1
{% for galleryitem in customGallery.gallery.items %}
{{ galleryitem.fileName }}
{% endfor %}
This example assumes that your gallery component has the alias “customGallery” and that you have the Image Resizer Plugin installed. Thumbnails are generated for the images and displayed in a flexbox, with each thumbnail providing a link to the full-resolution image. Example Page 2
{% for galleryitemchunk in customGallery.gallery.items.sortBy('fileName').chunk(3) %}
{% for galleryitem in galleryitemchunk %} {% endfor %}
{% endfor %}
Again, we are assuming that your component has the alias “customGallery” and that you have the Image Resizer plugin installed. The images are sorted by filename and “chunked” into groups of 3 images, which are then displayed using the Bootstrap grid layout. Check out the Demo Site for live examples of the above.