Add multiple images on one page

How do I add multiple images to a page?

I want to have 3-4 paragraph pages and in paragraphs I want to have multiple images, like a small photo gallery, I found an extension for images in the bolt lib but it is more photography oriented and I am wandering if it can be done easier and then use the plugin ... The curiosity is that boltcms can do this with the default build.

+3


source to share


2 answers


In your setup file contenttypes.yml add to your maislist fields something like this:

    gallery:
        type: imagelist
        label: "Gallery Images"

      



Then in your frontend template, you print them in the style your gallery plugin needs, here used as an example:

{% for image in record.gallery %}
    <a href="{{ thumbnail(image, 1000, 1000) }}">
        <i class="fi-arrows-expand hide"></i>
        <img src="{{thumbnail(image,150,100)}}"> 
    </a>   
{% endfor %} 

      

+5


source


If you want to use the lightbox plugin that comes with the default Bolt theme, the @Ross' loop for

might be a little simpler:



{% for img in record.gallery %}
    {{ popup(img, 150, 100) }}
{% endfor %}

      

0


source







All Articles