-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Reusing fields of other content types #563
Comments
I am thinking about the following configuration/setup to reuse the fields: {
"frontMatter.taxonomy.fieldGroups": [
{
"id": "GeneralFields",
"fields": [
{
"title": "Title",
"name": "title",
"type": "string",
"single": true
},
{
"title": "Description",
"name": "description",
"type": "string"
}
]
}
],
"frontMatter.taxonomy.contentTypes": [
{
"name": "default",
"pageBundle": false,
"previewPath": "'blog'",
"filePrefix": null,
"fields": [
{
"name": "fieldCollection",
"type": "fieldCollection",
"fieldGroup": "GeneralFields"
},
{
"title": "Publishing date",
"name": "pubDate",
"type": "datetime",
"default": "{{now}}",
"isPublishDate": true
},
{
"title": "Content preview",
"name": "heroImage",
"type": "image",
"isPreviewImage": true
}
]
}
]
} Do you have any feedback on this @Fasani @itsjavi? Edit: I think reusing the |
@estruyf that will be enough :) thanks! |
Great, I have added this logic to the latest beta version. Please feel free to test it out and let me know how it works for you. |
@estruyf I finally could test it and works as expected, thanks for adding this! <3 |
Discussed in #559
Originally posted by itsjavi April 3, 2023
I have 2 content types that have a very similar structure: "Page" and "Article", and I'd like to combine the fields that these 2 content types have in common, to avoid repeating the configuration. Kind of an "inheritance" / merge.
...
The text was updated successfully, but these errors were encountered: