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"
|
folder: "_sink"
|
||||||
create: true
|
create: true
|
||||||
fields:
|
fields:
|
||||||
|
- label: "Related Post"
|
||||||
|
name: "post"
|
||||||
|
widget: "relationKitchenSinkPost"
|
||||||
|
collection: "posts"
|
||||||
|
searchFields: ["title", "body"]
|
||||||
|
valueField: "title"
|
||||||
- {label: "Title", name: "title", widget: "string"}
|
- {label: "Title", name: "title", widget: "string"}
|
||||||
- {label: "Boolean", name: "boolean", widget: "boolean", default: true}
|
- {label: "Boolean", name: "boolean", widget: "boolean", default: true}
|
||||||
- {label: "Text", name: "text", widget: "text"}
|
- {label: "Text", name: "text", widget: "text"}
|
||||||
@ -77,6 +83,12 @@ collections: # A list of collections the CMS should be able to edit
|
|||||||
name: "object"
|
name: "object"
|
||||||
widget: "object"
|
widget: "object"
|
||||||
fields:
|
fields:
|
||||||
|
- label: "Related Post"
|
||||||
|
name: "post"
|
||||||
|
widget: "relationKitchenSinkPost"
|
||||||
|
collection: "posts"
|
||||||
|
searchFields: ["title", "body"]
|
||||||
|
valueField: "title"
|
||||||
- {label: "String", name: "string", widget: "string"}
|
- {label: "String", name: "string", widget: "string"}
|
||||||
- {label: "Boolean", name: "boolean", widget: "boolean", default: false}
|
- {label: "Boolean", name: "boolean", widget: "boolean", default: false}
|
||||||
- {label: "Text", name: "text", widget: "text"}
|
- {label: "Text", name: "text", widget: "text"}
|
||||||
@ -119,6 +131,12 @@ collections: # A list of collections the CMS should be able to edit
|
|||||||
name: "list"
|
name: "list"
|
||||||
widget: "list"
|
widget: "list"
|
||||||
fields:
|
fields:
|
||||||
|
- label: "Related Post"
|
||||||
|
name: "post"
|
||||||
|
widget: "relationKitchenSinkPost"
|
||||||
|
collection: "posts"
|
||||||
|
searchFields: ["title", "body"]
|
||||||
|
valueField: "title"
|
||||||
- {label: "String", name: "string", widget: "string"}
|
- {label: "String", name: "string", widget: "string"}
|
||||||
- {label: "Boolean", name: "boolean", widget: "boolean"}
|
- {label: "Boolean", name: "boolean", widget: "boolean"}
|
||||||
- {label: "Text", name: "text", widget: "text"}
|
- {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