Hey @JewelryDesign,
Thank you for providing the loom and additional information. Yes, we did indeed do something like this when we launched our Webflow + After Effects/Lottie course in 2019!
We created a text field in the CMS which holds a Lottie JSON URL. We uploaded the JSON file to an external server. (Today, this might be possible if you upload it to your Assets and copy the URL from there.)
On the page itself, we added a Lottie element & a text element, then we wrote some custom JavaScript with would pull the text from that JSON text field and inject it into the Lottie element. (I recall us also having to write some custom JavaScript to trigger that swap on page load.)
It was definitely quite a bit of work, and we won’t be able to troubleshoot the custom code on here, but I’m happy to share what we have in case you want to experiment with it, or in case someone else on the forum might have ideas regarding its implementation!
I will attach a screenshot of the designer and add in the custom code used. Remember that the class name has to be the same for the Lottie element in the designer and the custom code class.
Custom code used:
<script>
var lottieDivs = document.querySelectorAll('.lottie-thumbnail');
Array.prototype.slice.call(lottieDivs).forEach(div => {
if (!div.nextElementSibling) return;
var url = div.nextElementSibling.innerHTML; // text url;
if (!url) return
div.setAttribute('data-src', url)
})
window.Webflow.require('lottie').init();
</script>
