Following the examples here: Widgets | Netlify CMS | Open-Source Content Management System.
Here are my relations:
- name: blog
label: Blog
folder: _data/blogs
slug: '{{year}}-{{month}}-{{day}}-{{slug}}'
create: true
fields:
- { name: entityType, label: EntityType, widget: hidden, default: blog}
- {
label: Template,
name: template,
widget: hidden,
default: Blog,
}
- name: path
label: Path
widget: string
pattern: [/]
hint: "Path must start with /"
- { name: date, label: Date, widget: datetime }
- { name: title, label: Title }
- name: categories
label: Categories
widget: relation
collection: page-settings
file: blog-settings
valueField: blog-settings.*.category
displayFields: [blog-settings.*.category]
multiple: true
- label: Meta Description
name: metaDescription
widget: text
required: false
- { name: Header, label: header, widget: string}
- { name: Sub Header, label: sub-header, widget: string}
- label: Image
name: portrait
widget: image
hint: "Image size 1280x800 works best :)"
required: true
media_library:
config:
multiple: false
- { name: body, label: Body, widget: markdown }
- { name: video-link, label: Video URL, widget: string }
- name: page-settings
label: Page Settings
files:
- name: gallery-settings
label: Gallery Settings
file: gallery-settings.json
format: json
fields:
- name: gallery-settings
label: Gallery Types
widget: list
fields:
- { name: category, label: Category Name, widget: string, required: true }
- name: blog-settings
label: Blog Settings
file: blog-settings.json
format: json
fields:
- name: blog-settings
widget: list
label: Blog Types
fields:
- { name: category, label: Category Name, widget: string, required: true }
I feel like I must have done something wrong, but it seems correct to me. The categories do not load into the relation list.