variar / grav-plugin-unitegallery

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

Images in different location than page & photoswipe for lightbox #20

Closed gymnae closed 6 years ago

gymnae commented 6 years ago

I'm breaking the protocol of issue reporting, but I'll ask two questions in one:

  1. How can I set the location of the images manually? My pics are located in a different folder: /users/images/photostore and its subfoldes. How could I define a subfolder as the origin for my pictures?

  2. Can I freely decide which lightbox to use? I'd like to go for photoswipe for lightbox, but use the logic of your plugin for creating the galleries.

variar commented 6 years ago

Hi, to use different images folder you can pass it in custom twig template. Something like this may work

{{ unite_gallery(page.find('/my_custom_images_folder').media, '{"gallery_theme":"tiles", "tiles_type":"justified"}') }}

My plugin is only generating html code and passes options to unitegalley js. If unitegallery has some option to change lightbox, it should be possible to pass it through.

The code of the plugin is rather simple. In theory it could be extended to support several gallery backends.

gymnae commented 6 years ago

Thank you for your super quick reply. I'll try it out.