it seems that the list widget cannot loop after nested keys #279
Answered
by
kyoshino
acivitillo
asked this question in
Q&A
|
I wanted to understand if this is intended behavior for a list widget, I am not able to find it in the documentation. This works: - label: "Foundations Keys"
name: "keys"
widget: "list"
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "content", widget: "string" }keys:
- content: with solid CI/CD and documentation
title: Automation
- content: Intuitive tools, clear APIs, and robust frameworks
title: Developer Experience
- content: Growing usage without exponentially growing tech debt and costs
title: Scalability
- content: Data governance, networking, and access
title: Governance & Security
- content: Clean, consistent, and enriched data for analysis
title: Data ReadinessWhile this doesn't work: - label: "Foundations Keys"
name: "foundations.keys" #<- this doesn't seem to work
widget: "list"
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "content", widget: "string" }foundations:
keys:
- content: with solid CI/CD and documentation
title: Automation
- content: Intuitive tools, clear APIs, and robust frameworks
title: Developer Experience
- content: Growing usage without exponentially growing tech debt and costs
title: Scalability
- content: Data governance, networking, and access
title: Governance & Security
- content: Clean, consistent, and enriched data for analysis
title: Data Readiness |
Answered by
kyoshino
Dec 22, 2024
Replies: 2 comments 6 replies
|
Yeah, the So, this should work: - label: "Foundations"
name: "foundations"
widget: "object"
fields:
- label: "Keys"
label_singular: "Key"
name: "keys"
widget: "list"
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Content", name: "content", widget: "string" } |
2 replies
Answer selected by
acivitillo
|
@kyoshino I wonder if this can be changed. We have a variety of dot-nested fields in our metadata. The CMS can read them, but saving entries writes an object it cannot read. |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, the
namecannot contain dots because Sveltia CMS internally keeps an entry draft as a flattened object that uses dot notation for nested objects. I’ll mention the limitation when I create docs for Sveltia 😅So, this should work: