Custom CMS lightbox with Slider · Conditional visibility bug

Hi!

I’m creating a custom Lightbox using a slider. Each slide contains an image retrieved from the same CMS project. Each slide has conditional visibility, meaning it only shows if its corresponding image is set in the CMS. I building it in the Work Collection page.

I’m facing an issue where, if a collection has fewer images than the number of slides set by default, I have to click twice on the last slide to loop the slider.

I can’t use any custom code for this project because it’s a Webflow Marketplace template, so solutions like Finsweet are unfortunately not an option. While I could redo the slider myself with custom animations, it would be much easier for the user to add a new slide with just one click.

I’ve tried building it with a collection inside each slide and without, but that didn’t solve the problem. The issue occurs with every premade slider animations. Maybe it has something with how I built the slides, but I can’t find a solution.

Here is my public share link
You can have a look at the live site

Thank you for taking the time to look into this!

All the best,
Fireal

Hey @Resonance,
Great job on the template it looks great, and the functionality you managed to accomplish natively is pretty cool. What you are trying to fix is not possible, mainly because you can’t add dynamic number of slides on a slider inside a collection page natively. The number of slides you put on the slider has to be the same on all collection pages. An easy fix would be to just have the same number of images displayed on the slider for each collection item. Another option, and I don’t recommend this one, is to have multiple sliders that are displayed based on the number of images, for example 4img slider, 6img slider and so on, that is possible natively. I hope this helps!

Hi @Pablo_Cortes, thank you for taking a look into this and your nice words, it means a lot!
It’s unfortunate it’s not manageable natively. I’ll explore the solutions you shared, thank you so much again, have a great day :heart_decoration:

1 Like