[Plugin: NextGEN Gallery] [NextGen Gallery] Open album in lightbox
-
I just had to solve the problem of opening up a NextGen Gallery album in a lightbox for a client (as opposed to opening it up in it’s own page first, and then clicking on a thumbnail to open the images in a lightbox), and due to the number of unanswered posts on the subject I thought I would go ahead and share my solution. This was done via a custom function, ngg’s templating system, and for what I was doing I wound up needing to use the PrettyPhoto Media plugin to get it all working nicely. First I added the following nggGetGallery() function to my client’s functions.php:
Next I created a new template inside of nextgen-gallery/view/ named album-lightbox.php:
This was based off of the album-compact.php template. The format for adding galleries is now:
[album id=7 template=lightbox]
This worked great, aside from the fact that with multiple albums on a single page it would treat them all as a single gallery. I solved this by installing the PrettyPhoto Media plugin:
https://www.ads-software.com/extend/plugins/prettyphoto-media/
Then I went to Gallery -> Options -> Effects, changed the dropdown to Custom, and added this code:
rel=”prettyPhoto[%GALLERY_NAME%]”
And voila, it all worked. I hope this helps someone else looking for a solution to that.
-Michael
https://www.ads-software.com/extend/plugins/nextgen-gallery/
- The topic ‘[Plugin: NextGEN Gallery] [NextGen Gallery] Open album in lightbox’ is closed to new replies.