Streaming live at 10am (PST)

Webflow API CMS gallery


#1

Hi guys,

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


#2

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.


#4

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?


#5

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

http://flickrsearch.webflow.io


#6

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.

https://preview.webflow.com/preview/dan-wilton?preview=52cf87fb2448c1b2c6c1b3f0c8a3abbc


#7

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


#8

Yes. JavaScript is awesome :wink:


#9

Hey @jjms01,

This might help https://forum.webflow.com/t/full-cms-lightbox/33669

Let us know if it worked out :slight_smile:

Best,
Naweed


#10

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


#11

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:
https://preview.webflow.com/preview/dan-wilton?preview=52cf87fb2448c1b2c6c1b3f0c8a3abbc

Any ideas? @oramsdesign @PixelGeek?


#12