Use Collection fields in custom code embeds

With Dynamic Embeds, you can use your CMS Collection fields to dynamically update embedded code.

We’re transitioning to a new UI, and are in the process of updating our Webflow University content.

With dynamic embeds, you can use your CMS Collection fields to dynamically update embedded code. Which lets you create dynamic social share buttons, ecommerce storefronts, podcast and music sites, event sites, and much, much more.

Ingredients of a dynamic embed

Every dynamic embed is a little different, but they all require the following:

  • The third-party embed code with unique identifiers for the thing you want to dynamically serve (be it a tweet, Shopify product, or Eventbrite event)
  • A Webflow CMS Collection with a Plain Text field so you can enter that unique identifier

Creating a dynamic embed

Let's create a click-to-tweet button. To create the dynamic embed:

  1. Create a Plain text field in your collection for the unique identifier, call it "Tweet text"
  2. Grab the code below
  1. Add an Embed element in a Collection list or on a Collection page
  2. Paste in the code
  3. Select the unique identifier "Tweet Text"
  4. Click Add Field
  5. Select "Tweet Text"
A HTML embed code editor is open and filled out. The + Add field button on the right side of the editor is highlighted. The drop down text menu "Tweet Text" is also highlighted on the editor.
See a detailed tutorial on how to create a more custom click-to-tweet button.

Check out these tutorials and see how you can use dynamic embeds to set:

Known limitation: Dynamic embeds using Ecommerce fields will not update based on the variant selected. For example, you might use a dynamic embed to display the price of your product. If a visitor to your site selects a product variant with a different price, that change in price will not be update via the dynamic embed, and the customer will see no change in price.

Table of contents

Continue learning

Hmm…we couldn’t find any results for “search query”. Try a different search term or check out our community forum.

Search the forumReset the filter
Load more

Filter

Reset
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Topics
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Back to top