• Resolved Peter Ingersoll

    (@peteringersoll)


    Hello,

    I am trying to get the image description to show up in the FooBox lightbox. When I use Foobox Gallery, the description makes it to the lightbox.

    I want to use the dynamic parameter-driven power of MLA. I imagine there is just a setting or parameter to get the description to the lightbox – but I can’t find it.

    It’s interesting how there seems to be little info on using FooBox with MLA.

    https://www.ads-software.com/plugins/media-library-assistant/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question. MLA works with many lightbox plugins, but each of them is different and requires a separate investigation.

    When you use the MLA alternate shortcode support MLA does not play any direct part in the gallery composition, so passing values such as the description can be tricky.

    I am traveling and away from my development system. I will investigate this as soon as I return and post an update when I have progress to report. Thanks for your understanding and your patience.

    Plugin Author David Lingren

    (@dglingren)

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show description in FooBox lightbox’ is closed to new replies.