I’m trying to use the below framework from W3 to have a slideshow that displays user uploaded images with a corresponding caption (which I haven’t found a way to do natively). I’ve already added the CSS and created a template column that captures all images a user has uploaded with their captions, but I can’t seem to figure out how to properly implement the Javascript portion. Any help?
You should try to prompt this to the AI component and tell it to accept a certain structure of data so you can have a dynamic slideshow.
Is there a reason to take this approach vs using the javascript? Can this be accomplished with Glide otherwise?
I haven’t tried this in the new version of Glide so I’m not sure, either way is worth an approach if you ask me, but the AI component might be more friendly to setup.
Though, it’s a beta feature, so it’s not guaranteed to be stable.
Yes, you can do it without using the AI component, quite easily.
- Paste everything from that W3Schools example into a Template column, adding replacements as necessary for your images and captions
- Feed that into a HTML to URL column.
- Display that in a Web Embed component.
Example:
This solution worked! Thank you. If you don’t mind explaining, what about this particular method allows this to work vs a combination of columns and custom css (which I couldn’t seem to figure out)?
The code gets “interpreted” correctly in a “HTML to URL” column. It gets converted to a format that works with the web embed component (data URI),