Fancybox 2: Gallery from a single image

User 2879688 Photo


Registered User
201 posts

Hi CC Forum
I have a Fancybox gallery set up on a website using multiple images on one page. http://gaiaforms.com/portfolio.html
I wish to set up a gallery from just using a single image. Has anyone done this?
Ive attached my RSD file so that anyone can look at the code.

Perhaps this isnt relevant to a gallery from a single image but...

At the moment, after exporting in RSD, to get the gallery to work, I need to add using an html editor

data-fancybox-group="gallery"

within the <a href> of each and every image in the gallery - eg

<a href="images/gallery/Chrysanthemum.jpg" data-fancybox-group="gallery" class="responsive-picture galleryImage fancybox"><picture><img alt="Placeholder Picture" srcset="./images/gallery/Chrysanthemum.jpg"></picture></a>
Attachments:
Jazz isn't dead it just smells funny!
User 187934 Photo


Senior Advisor
20,266 posts
Online Now

Try setting the images you don't want to show on the page to display:none.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2879688 Photo


Registered User
201 posts

Thanks Eric
Tried that but it hides all the pictures
Managed a work round and added a class xhidden but it just seems a bit messy having element there that will alter other elements. I know there's some code for this but can't find a way to make it works on RSD yet.
Thanks Tim
Jazz isn't dead it just smells funny!
User 2879688 Photo


Registered User
201 posts

I found this code but dont know hoe to fit it into RSD

https://gist.github.com/noahshrader/5870998

Thanks Tim
Jazz isn't dead it just smells funny!
User 187934 Photo


Senior Advisor
20,266 posts
Online Now

I did this page totally in RSD. It uses colorbox but it's very similar. The only html element is for the image map. All the other images that popup are hidden with display :none at the bottom of the page.
https://pestlogbook.com/help/pest-logbo … e-map.html
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2879688 Photo


Registered User
201 posts

Hi Eric
Thanks for that.
Good thinking. They don't have to be in the way do they just on the same page. Speaking of which, I think that's what I need to do !
Actually found I could change the column class name to be able to change the display to 'none' without making the first image disappear. Then it frees up the column space as though it wasn't there.
Thanks Tim
Jazz isn't dead it just smells funny!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.