Webflow API CMS gallery

Hi guys,

Would it be possible to create a custom CMS light box gallery using the new Webflow API?

What are you trying to achieve here? CMS lightbox should already be possible using custom code. API is only for pulling/pushing from external sources.

I was hoping that I could create a lightbox ‘type’ gallery using the cms.

Currently I have a grid of images as thumbnails > Then I click on a thumbnail and this takes me through to the collection item which displays the full size image or video.

What I am hoping to do is add Prev/Next buttons on either side but right now there isn’t a way to reference and link the prev/next item in a collection. I am aware of the work around for this but that’s not feasible as I have a lot of images.

I was hoping that the API might be the answer for this?

If you can display all the required images on one page, you can dynamically add linked lightboxes using custom code.

I’m displaying photographs from a collection at the moment and using custom code to display a lightbox.

The problem I’m facing is that I need to be able to use a Rich Text element for the caption and cannot reference that in the embed code.

Currently the captions using a plain text reference display captions with unicode when adding “&” or an apostrophe.


Is the pagination in the flickr example done with custom code?

Yes. JavaScript is awesome :wink:

1 Like

Hey @jjms01,

This might help Full CMS Lightbox!

Let us know if it worked out :slight_smile:


Dang! I was hoping for a Webflow Christmas miracle! :wink:

That is what I’ve implemented on the site.

But I’m having a huge issue with the captions as they are stripping the unicode and just displaying the HTML entity ie. When I type a caption "I'm short & sweet" it’s then displaying "I' m short & sweet".

I have a feeling this is because it’s passing dynamic data through to the JSON as when I just type in a caption it displays fine…

Not sure what to do. Attached are some screenshots an here is the read me link:

Any ideas? @oramsdesign @PixelGeek?

1 Like