variar / grav-plugin-unitegallery

Grav plugin to create image galleries with unitegallery js library
MIT License
19 stars 5 forks source link

Add custom ID names to enable more than one gallery on a page #5

Closed MrMacStripe closed 7 years ago

MrMacStripe commented 7 years ago

At the moment there is no way to add several galleries into one page. I´d like to add galleries based on folders (that would be no problem), but the custom ID feature doesn´t change when rendered, even if you put gallery_div_id into the json options.

variar commented 7 years ago

Thanks for the suggestion. I've implemented it in d6f9d82270f968ecef11095169bf439ed8a994e7. Should be in v1.1.1. Added some info about this kind of setup to Readme. @MrMacStripe, could you please test if it does the right thing for your use сase?

variar commented 7 years ago

Added additional json parameter grav_gallery_div_id. Should work in v1.1.2

MrMacStripe commented 7 years ago

I´m sorry for the late reply. Thank you very much, the implementation is decent. I´ve got another idea that would enhance the usability further.

Implementing a "display only images that contain this string" option. Since Grav provides the meta option, you should be able to crawl the images within a page for class-names, alt-names, titles and the actual filename. That would enable to simplifiy the use-case for things like:

I´ve got images from 2016, 2015 and 2014. The file names are 2014_1,2014_2,2015_1 and ongoing. Now display a gallery sorted by years.

The implementation would be pretty simple. PHP offers an actual function for this if I remember correctly.

variar commented 7 years ago

Hi, I'll make another issue to track this "display only images that contain this string" suggestion #6.