# 在自定義屬性中使用 CMS 數據

我們聽到了您的反饋，如果能夠在 CMS 集合頁面上使用動態數據來使自定義代碼和 HTML 屬性更加強大，那該有多酷——我們很高興地告訴您，您現在可以綁定 CMS 數據字段**或組件屬性到自定義屬性或元素 ID**。

![此增強功能減少了設計人員依賴自定義代碼及其動態數據的需要。](https://i.imgur.com/PFAieSR.jpg)

**在自定義屬性中使用動態數據的示例 –**&#x20;

* 通過使用數據填充 ARIA 屬性和其他掛鉤來提高站點的可訪問性。
* 使用 CMS 數據來控制使用 HTML 數據屬性的集成或小部件，例如地圖或社交媒體預覽。
* 為編輯人員提供使用組件屬性設置屬性的方法，從而實現技術控製而無需複雜性或擔心它們會破壞站點。
* 使用自定義 CSS 根據字段值自定義頁面樣式。例如，通過將類別字段綁定到屬性，然後在 CSS 中使用屬性選擇器（如 div\[data-category]），您的博客的不同類別可以看起來不同。#IYKYK
* 或者你能想到的任何其他東西！

簡而言之，將屬性與 CMS 一起使用可以進一步彌合設計、代碼和動態數據之間的差距——為您創建的網站提供強大的功能和靈活性。您將通過哪些其他方式使用此新功能？[在這裡加入對話](https://twitter.com/noahraskin_/status/1633889639109885952)，讓我們知道！

‍

**更新：** ……就像那樣，數據綁定現在也適用於集合列表和嵌套集合！


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tenten.co/docs-webflow/webflow-101/changelog/2023/zai-zi-ding-yi-shu-xing-zhong-shi-yong-cms-shu-ju.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
