I have created a data collection of slide presentations (called SlideShare) stored on SlideShare’s website. In the data collection I have the presentation title and the embed code for SlideShare for each presentation.
I can use the embed code in an html field which works fine. But I want to set up dynamic pages so I don’t have to create a dozen new pages with slides.
I’m trying to create dynamic pages from the SlideShare data collection. Ideally I want to display the embedded presentation on the detail page. This is the code I currently have (from a prior closed post I found on this forum but was for a URL). I thought I saw something about this somewhere and am hoping someone can help me. I’d rather not build a bunch of manual pages showing the slides and I’d rather keep them on our website.
import wixLocation from 'wix-location';
import wixData from "wix-data";
$w.onReady(function () {
let item = $w("#dynamicDataset").getCurrentItem();
let embed = item.embedCode;
$w("#html1").src = embed;
} );
Error I get in Preview is:
Wix code SDK error: The url parameter that is passed to the src method cannot be set to the value . It must be of type url.
I can’t use type URL for embed code because it isn’t a URL. So I have it as a text field.
I read something about passing a message to the html field (from the data collection, probably) but now I can’t find that post.
Thanks in advance for any help.
#embed
#dynamic page
#data collection