sal0max / grav-plugin-shortcode-gallery-plusplus

A Shortcode extension to add sweet galleries with a lightbox to your Grav website.
MIT License
33 stars 7 forks source link

List images in directory #42

Open briceambrosiak opened 10 months ago

briceambrosiak commented 10 months ago

Instead of listing images manually, it would be nice to be able to put a folder and all images in the folder would be displayed in the gallery. See this plugin: https://github.com/michaijtsma/grav-plugin-dir-gallery (but yours is nicer)

s22-tech commented 4 months ago

I agree. This would be a very nice addition. Thanks!

dbuchhorn commented 2 months ago

This is already possible if Twig is used

[gallery]
{% for image in page.media | sort %}
  {{  image | markdown }}
{% endfor %}
[/gallery]

Then "Process Twig First" must be enabled in the Advanced Tab.