Streaming live at 10am (PST)

Add Dynamic Embed to a Blog Post


Id like to add a dyamic embed that is unique to each post in a blog entry. An example of the embed is:

<iframe width="100%" height="520" frameborder="0" src="" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>

and each entry would have a unique embed. How can this be achieved?


Hi @kalincan, one thing that can be done is to add a custom code embed to the page, and then paste in the snippet you shared above and save the embed.

Next, create a text field in your collection and give that field a name that will easily identify the field as being the unique url you need to use for each post and save the collection. Edit your items with a unique url for each collection item.

From the looks of the code snippet, this should probably be this part:

Next, go to the embed you saved earlier on the page, and select the url in the snippet, and insert the url field from the CMS.

After updating the embed, save and republish the site, and now each collection item having a url added to the collection, will get a different iframe content based on the url added to each individual item.

I hope this helps.

Thanks so much, this works perfectly!


1 Like

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.