Hi there,
setting up Netlify CMS together with Gatsby I came across some use cases where I have a lot of the exact same field configurations for collections. Is there a way to define fields for multiple collections so I don’t have so much duplicates in my config? What I want to achieve is similar to using a folder collection so multiple files have access to the same fields, but with the difference that I want the files to be in separate folders and separately accessible in the CMS.
Appreciating any help!
Thanks,
Jenny
There’s an open feature request that you can track here:
opened 02:52PM - 07 May 18 UTC
kind: feature
kind: discussion
area: configuration
pinned
<!--
If you are reporting a new issue, make sure that we do not have any duplic… ates
already open. You can ensure this by searching the issue list for this
repository. If there is a duplicate, please close your issue and add a comment
to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to
include the BUG REPORT INFORMATION shown below. If you fail to provide this
information within 7 days, we cannot debug your issue and will close it. We
will, however, reopen it if you later provide the information.
If you have an issue that can be shown visually, please provide a screenshot or
gif of the problem as well.
---------------------------------------------------
BUG REPORT INFORMATION
---------------------------------------------------
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
-->
**- Do you want to request a *feature* or report a *bug*?**
feature
**- What is the current behavior?**
Reuse of configuration data, such as a group of fields being defined once and used in multiple collections, is dependent on YAML features. These features are difficult to understand and use, and aren't available in simpler formats like JSON.
**- What is the expected behavior?**
Netlify CMS should provide means for defining reusable configuration subsets, like field groups, that are easy to understand and use, and format independent.
This is based on the conversation in https://github.com/netlify/netlify-cms/issues/1186#issuecomment-382003132.
A couple of approaches and workarounds are discussed there.
@tomrutgers I didn’t find this request, thank you!