Skip to content

Support request: How to configure a widget for a yml list #2514

@chrfritsch

Description

@chrfritsch

My yml datastructure is like this:

- description: Description 1
  date: 2019-10-13T15:04:10.000Z 
- description: Description 2
  date: 2020-03-01T15:04:10.000Z 

Now I want to configure my widget in netlify cms for it. I tried something like

  - name: settings
    label: Settings
    editor:
      preview: false
    delete: false
    files:
      - file: src/data/events.yml
        label: Events
        name: events
        fields:
          - label: Event
            name: event_items
            widget: list
            fields:
              - {label: Date, name: date, widget: datetime}
              - {label: Description, name: description, widget: string}

This doesn't work because it always adds an event_items key at the top and I didn't manage it to get rid of it.
Hopefully, some can help me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions