All updates

Enhancement

CMS

Use CMS data in custom attributes

We heard your feedback — now you can bridge design, code, and dynamic data for even more flexibility and power.

Use CMS data in custom attributes

We’ve heard your feedback on how cool it would be to be able to use dynamic data on CMS Collection pages to make custom code and HTML attributes even more powerful – we’re excited to tell you that you can now bind CMS data fields or component properties to custom attributes or element IDs.

This enhancement reduces the need for designers to rely on custom code with their dynamic data.
This enhancement reduces the need for designers to rely on custom code with their dynamic data.

Examples of using dynamic data in custom attributes – 

  • Improve your site’s accessibility by using data to populate ARIA attributes and other hooks.
  • Use CMS data to control integrations or widgets that use HTML data attributes, like maps or social media previews.
  • Give editors ways to set attributes using component properties, enabling technical control without the complexity or worrying they’ll break the site.
  • Customize page styling based on a field value, using custom CSS. For example, different categories of your blog can look different by binding a Category field to an attribute, then using an attribute selector in your CSS like div[data-category]. #IYKYK
  • Or anything else you can think of!

In short, utilizing attributes alongside your CMS further bridges the gap between design, code, and dynamic data – offering power and flexibility to the websites you create. What are some additional ways you’ll use this new capability? Join the conversation here and let us know!

Update: …and just like that, data bindings now also work in Collection lists and nested Collections!


Launched on
March 14, 2023
Category
CMS

Related updates

Introducing the next-gen Webflow CMS

Introducing the next-gen Webflow CMS

Learn more
Faster CMS item creation and undo/redo improvements

Faster CMS item creation and undo/redo improvements

Learn more
Expanded on-canvas editing

Expanded on-canvas editing

Learn more
CMS auto-save

CMS auto-save

Learn more
CMS Collection list updates

CMS Collection list updates

Learn more
Comment directly on dynamic CMS content in Webflow

Comment directly on dynamic CMS content in Webflow

Learn more

Get started for free

Try Webflow for as long as you like with our free Starter plan. Purchase a paid Site plan to publish, host, and unlock additional features.

Get started — it’s free
Watch demo

Try Webflow for as long as you like with our free Starter plan. Purchase a paid Site plan to publish, host, and unlock additional features.