I have returned home and had some time to work with Foo Gallery and FooBox Free Image Lightbox. If you haven’t found it already, here is an earlier topic along similar lines:
Foo Gallery / Foo Box or alternative – how to use shortcode
For my experiments I installed FooBox and used the default settings, including checking all three boxes in the “What do you want to attach FooBox to?” section. With these settings, FooBox adds some classes to every [mla_gallery]
gallery and adds lightbox functionality to the gallery display.
The Foo Gallery shortcode uses the same classee, but it adds a couple of attributes to each of the gallery hyperlinks; data-attachment-id
and data-caption-desc
. It looks like the data-caption-desc
attribute is used by FooBox to add the Description to the lightbox display.
There are two ways to add the Description to your [mla_gallery]
output for use by FooBox. First, you can use the mla_caption
parameter to replace the default caption with the Description:
[mla_gallery mla_caption="{+description+]"]
Add any data selection parameters you like to the above example. In my experiments, the Description value appears below the thumbnail images in the gallery. When the lightbox is activated, both the Description and the original Caption or ALT Text values are shown for each image.
To replicate the Foo Gallery a bit more closely you can add the data-caption-desc
attribute to each gallery item instead:
[mla_gallery mla_link_attributes='data-caption-desc="{+description+}"']
This variation shows the original caption below the gallery thumbnails and adds the Description to the lightbox display.
Of course, both the mla_caption
and mla_link_attributes
parameters are merely a convenience. They allow you to change some elements of the galley markup without creating an MLA custom markup template. If you need more complete control over your [mla_gallery]
output you can follow the instructions in the “Style and Markup Templates” section of the /Settings/Media Library Assistant Documentation tab to create your own template.
I hope that gets you started on a solution for your application. I am marking this topic resolved, but please update it if you have problems or further questions regarding the interaction between [mla_gallery]
and the FooBox Free Image Lightbox. Thanks for your interest in the plugin.