add example of custom relation widget with custom preview
This commit is contained in:
parent
429ab2c393
commit
6af9a3155c
@ -62,6 +62,12 @@ collections: # A list of collections the CMS should be able to edit
|
||||
folder: "_sink"
|
||||
create: true
|
||||
fields:
|
||||
- label: "Related Post"
|
||||
name: "post"
|
||||
widget: "relationKitchenSinkPost"
|
||||
collection: "posts"
|
||||
searchFields: ["title", "body"]
|
||||
valueField: "title"
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Boolean", name: "boolean", widget: "boolean", default: true}
|
||||
- {label: "Text", name: "text", widget: "text"}
|
||||
@ -77,6 +83,12 @@ collections: # A list of collections the CMS should be able to edit
|
||||
name: "object"
|
||||
widget: "object"
|
||||
fields:
|
||||
- label: "Related Post"
|
||||
name: "post"
|
||||
widget: "relationKitchenSinkPost"
|
||||
collection: "posts"
|
||||
searchFields: ["title", "body"]
|
||||
valueField: "title"
|
||||
- {label: "String", name: "string", widget: "string"}
|
||||
- {label: "Boolean", name: "boolean", widget: "boolean", default: false}
|
||||
- {label: "Text", name: "text", widget: "text"}
|
||||
@ -119,6 +131,12 @@ collections: # A list of collections the CMS should be able to edit
|
||||
name: "list"
|
||||
widget: "list"
|
||||
fields:
|
||||
- label: "Related Post"
|
||||
name: "post"
|
||||
widget: "relationKitchenSinkPost"
|
||||
collection: "posts"
|
||||
searchFields: ["title", "body"]
|
||||
valueField: "title"
|
||||
- {label: "String", name: "string", widget: "string"}
|
||||
- {label: "Boolean", name: "boolean", widget: "boolean"}
|
||||
- {label: "Text", name: "text", widget: "text"}
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user