This is the Adapter key concept, so read really carefully 👂.
Probably in your Webflow theme you are using a lot of dynamic content that is binded to the Webflow CMS or Ecommerce. This dynamic content as you probably already know, can be used with Collection Lists and inside Collection Templates. (And if you don't know take a look at the official documentation).
Neither the CMS content and the bindings you made for Webflow CMS/Ecommerce are exported in HTML, so you need a way to tell the Adapter: "Hey, here I want to show 3 posts from my Blog". To do this, you will use custom attributes, and this is where the magic happens, you label the elements and the Adapter handles all the code for you! 💃💃💃
What are Custom Attributes?
Custom attributes? 🤔
Well, think Attributes as small marks that can be used to append additional information to your elements — they basically define characteristics of an HTML element. And they can be easily added in Webflow from the Settings Panel ⚙️. Official doc
An Attribute is defined by 2 parts:
Through the doc you will find these custom attributes listed in 2 different ways:
There are basically only 2 rules to never forget for custom attributes:
- When you see one of these 2 colors
just copy and paste, do not invent your own attributes! 🙅♂️ (try to click on them!)
- When you see this color instead
, the value depends on the situation and will be explained at the right moment (sometimes you will invent it 🤷♂️)
- (The one to forget about) You don't need to add attributes to everything 🤦♂
Where to add Attributes?
Rule of thumb 👍: every element that has a CMS binding and every Collection Template needs his own attribute.
Sometimes for Collection Templates, the Adapter is smart enough to understand on his own your intentions.
Not only CMS binded elements can have attributes, you will learn later on that some elements (Forms, Menus, Sections, etc...) can became dynamic using Custom Attributes.
If you instead already know how the Adapter works, take a look at our Cheatsheets.
For any other issue or doubt you can contact us.