I am trying to embed a Lottie animation on my Umbraco website. But embedding the
<script> in the <head>section is causing a error. Probably because of the 2x@ in the url...</p>
<script src="https://unpkg.com/@lottiefiles/lottie-interactivity@latest/dist/lottie-interactivity.min.js"></script>
I'm not sure about Lottie, but in your Umbraco views the @ symbol has a special meaning, it means 'write this variable out into the view'
eg
<h1>@Model.Name</h1>
would write out the value of Model.Name into the H1 tag...
... but your lottie Url contains an @ symbol in it's own right, so I think here you probably need to 'escape' this, which you an do in Razor by having two @@ symbols next to each other eg:
Lottie CDN
Hi,
I am trying to embed a Lottie animation on my Umbraco website. But embedding the
I am following this tutorial https://lottiefiles.com/interactivity for installation.
What can I do to be able to install Lottie-animations ?
Hope you can help me - since I am new to Umbraco :-)
Hi Mads
I'm not sure about Lottie, but in your Umbraco views the @ symbol has a special meaning, it means 'write this variable out into the view'
eg
would write out the value of Model.Name into the H1 tag...
... but your lottie Url contains an @ symbol in it's own right, so I think here you probably need to 'escape' this, which you an do in Razor by having two @@ symbols next to each other eg:
might work?
regards
Marc
Hi Mads,
Try use
@
instead of an actual @ to escape '@' symbol.Regards,
Debasish
is working on a reply...