Skip to content

it seems that the list widget cannot loop after nested keys #279

Answered by kyoshino
acivitillo asked this question in Q&A
Discussion options

You must be logged in to vote

Yeah, the name cannot 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:

- 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" }

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@kyoshino
Comment options

@acivitillo
Comment options

Answer selected by acivitillo
Comment options

You must be logged in to vote
4 replies
@kyoshino
Comment options

@kyoshino
Comment options

@bmackinney
Comment options

@kyoshino
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants