Lottie Animation into CMS collections

Hey guys,

I was just wondering if it is possible to add Lottie files into a cms collection ?

Thanks in advance

Hey :slight_smile:

CMS Collections do not support lottie animations as a field.
You’d need to create a workaround for that.

Off the top of my head I’d try the following:

Let the user paste the json code into a text field in the cms collection and display the json code as plain text on the page

Use custom js to find the text on the page and turn it into the proper syntax (nodes, attributes, nesting etc) dynamically on live site

I’m not sure text fields allow json syntax, you might need to encode it and decode it at runtime…

Don’t know if that’s too much of a hassle :thinking:

That sounds like a solution. I will try it and see how it goes.

thanks again