• Is is possible to get a gallery (previous and next buttons) for iframes?

    <a 
    href="[iframe url]"
    data-fancybox
    data-type="iframe"
    class="fancybox-iframe"></a>

    I’ve tried data-fancybox=”gallery” and rel=”gallery” for the links, but I can’t get it to work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ImageJohan Jonk Stenström

    (@jonkastonka)

    Ok, got it to work a little bit by adding rel=”[parent element class]”. But the previous and next buttons are still hidden. But I can css them to force them to show, but then I get the issue that I get a non working previous button on the first fancybox, and a non working next button on the last fancybox.

    Plugin Author ImageFirelightWP

    (@firelightwp)

    Hi @jonkastonka! In short, yes, it should be possible to open iframes with gallery navigation in the lightbox. I just did a quick test. If I add the following html to a page, the lightbox opens the pages in an iframe with gallery navigation. I just use this as an example of the simplest markup that should work.

    As an experiment, can you see if it this works as expected for you on a test page? If so, then we have a starting point and we can see if there’s something else that needs to be adapted to your case.

    <p><a href="https://en.wikipedia.org/wiki/France" class="fancybox-iframe" rel="iframegallery">Open France wikipedia page</a></p>

    <p><a href="https://en.wikipedia.org/wiki/England" class="fancybox-iframe" rel="iframegallery">Open England wikipedia page</a></p>

    Note I tested this with Classic Reloaded lightbox. I didn’t double check to confirm the other lightboxes yet. And if you are using pro lightbox, you might need slightly different markup.

    Thread Starter ImageJohan Jonk Stenström

    (@jonkastonka)

    Thanks!

    I solved it like this, using FancyBox V2:

    <div class="embed-scroll-items">
    <div class="embed-scroll-item">
    <a
    target="_blank"
    rel="noopener noreferrer embed-scroll-items"
    data-fancybox
    data-type="iframe"
    class="fancybox-iframe"></a>
    </div>
    </div>

    Plugin Author ImageFirelightWP

    (@firelightwp)

    Great! Thanks for following up and letting us know!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Iframe gallery’ is closed to new replies.