Created
June 21, 2021 17:31
-
-
Save Ferdi/708837b8f38969363b90bfcb40f5d516 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
collections: | |
- category: Content | |
folder: content/resources | |
label: Resources | |
name: resource | |
fields: | |
- { | |
label: Title | |
name: title | |
required: true | |
widget: string | |
} | |
- { | |
label: Description | |
name: description | |
widget: markdown | |
minimal: true | |
} | |
- { | |
label: File Type | |
name: filetype | |
required: true | |
widget: select | |
options: | |
- Image | |
- Video | |
- Document | |
- Other | |
} | |
- { | |
label: File | |
name: file | |
widget: file | |
} | |
# show the field below only if the type of resource is "image" | |
- { | |
label: Image Metadata | |
name: metadata | |
widget: object | |
condition: {field: filetype, equals: Image} | |
fields: | |
- { | |
label: Text alternative | |
name: image-alt | |
widget: string | |
} | |
- { | |
label: Caption | |
name: caption | |
widget: string | |
} | |
- { | |
label: Credit | |
name: credit | |
widget: text | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment