Streaming live at 10am (PST)

Dynamic Embeds - Assistance


#1

Hey guys I have a code question for the team…I have used the following code to pull images into a dynamic page template from the CMS:

<a class="w-inline-block w-lightbox" href="#">
<img src=“CMS CALL">
 <script class="w-json" type="application/json">
 { "group": "CMS CALL”, 
   "items": [{
     "cdnUrl": “CMS CALL",
     "type": "image",
     "url": "CMS CALL"
   }]
 }</script>
</a>

Now what I am wanting to do is add a video so this is what I have but I am not sure what KEY : VALUES to use…PLEASE HELP!! :))

<a class="w-inline-block w-lightbox footer-link" href="#">
Watch Video
 <script class="w-json" type="application/json">
 { "group": “CMS CALL”, 
   "items": [{
     "type": "video",
     "url": “CMS CALL"
   }] 
 }</script>
</a>

#2

Hi @finidev, thanks for the question, I might be a little confused what you are trying to accomplish, but at the moment, it is not possible to use a video cms field in the dynamic embed.

Videos in lightbox are using embed.ly, you can check the lightbox code on a published site.

Here is an example video embed:

<iframe class="embedly-embed w-lightbox-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPblDFLpaJJ8%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPblDFLpaJJ8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPblDFLpaJJ8%2Fhqdefault.jpg&amp;key=c4e54deccf4d4ec997a64902e9a30300&amp;type=text%2Fhtml&amp;schema=youtube" width="940" height="528" scrolling="no" frameborder="0" allowfullscreen=""></iframe>

The images in lightbox are using a simple url path to the image, and can be used in a dynamic embed:

<img class="w-lightbox-img w-lightbox-image" src="https://daks2k3a4ib2z.cloudfront.net/589b82c11f394ea53d071a12/589b83b4047ae8e564b5cbe1_Image%202017-02-08%20at%2010.46.21%20PM.png">

Were you trying to somehow use the cms video field to populate your code? Or how were you trying to populate that?

The Lightbox is not yet CMS enabled, except for the thumbnail image, which can be set via cms if the lightbox is part of a dynamic list or on a template page.

Thanks in advance, for your info.


#3

Okay so yeah, I did see the embedly stuff. I just wasn't sure if there was a way to manipulate it or not.