header-logo
Learn how to build your website and business using Wix.
Learn how to build, manage, and maintain a site with Wix.
Manage subscriptions, plans and invoices.
Run your business and connect with members.
Learn to purchase, connect or transfer a domain to your site.
Get tools to grow your business and web presence.
Boost your visibility with SEO and marketing tools.
Get advanced features to help you work more efficiently.
Find solutions, learn about known issues or contact us.
placeholder-preview-image
Improve your skills with our courses and tutorials.
Get tips for web design, marketing and more.
Learn to increase organic site traffic from search engines.
Build a custom site using our full-stack platform.
Get matched with a specialist to help you reach your goals.
placeholder-preview-image
In this article
  • Connecting an HTML widget to a dataset
  • FAQs

CMS: Connecting HTML Widgets to the CMS

5 min
In this article
  • Connecting an HTML widget to a dataset
  • FAQs
Connect HTML widgets (iFrames) to a dataset to display external websites (URLs) for each item in your CMS collection.

This is useful for displaying dynamic content like different event pages, partner websites, or portfolios where the website address changes for each item in your collection.
Note:
Currently, you can only connect the element to a collection field that contains a URL. It is not possible to connect raw HTML code (e.g. <iframe src..>) from the CMS. You can vote for this feature here

Connecting an HTML widget to a dataset

Select an embed code element in your editor and connect it to a dataset. Then choose whether to display HTML code or a website address (URL) from your collection fields.

Select the HTML widget in your editor and connect it to a dataset that connects to your CMS collection. Then choose the URL or Text field that contains the website address you want to display. 
  1. Go to the relevant page in your editor.
  2. Add the embed a site element to your page:
    1. Click Add Elements  on the left side of the editor.
    2. Click Embed Code.
    3. Click the Embed a site element to add it to your page. 
  3. Click the Connect to CMS icon .  
  4. Click the Choose a dataset drop-down and select an existing dataset that connects to your collection. Alternatively, select Add a Dataset, then choose the collection you want to connect, give the dataset a name and click Create.
  5. Click the HTML connects to drop-down and select the relevant field from your collection:
    Tip: Select + Add to create and connect a new 'URL' or 'Text' collection field
    • URL: (Recommended) Select the 'URL' field containing the HTTPS address you want to display.
    • Text: Select a 'Text' field containing a valid HTTPS URL. 
      Note: This field must contain a URL only. Raw HTML code is not supported.
Screenshot of connecting the embed code element to URL field.
  1. (If needed) Click and drag the borders of the element to resize it. 
  2. Click Preview to test your connections. 
  3. Click Publish if you are ready to make the changes go live. 

FAQs

Click below for answers to common questions about connecting embed code widgets.

Helpmate

Hello

Need a bit more guidance?
Summary of this article
Related articles
CMS: About Dataset Click Actions for Buttons and Images

CMS: About Your Collection Fields

CMS: Creating a Collection

CMS: About Datasets
Unlock personalized helpLog in to get the most out of Helpmate.