-
-
Notifications
You must be signed in to change notification settings - Fork 73
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: New content-relationship field? #585
Comments
The implementation of this new content relationship field has been added to the latest beta version. To use it, you can use the following configuration: "frontMatter.taxonomy.contentTypes": [
{
"name": "project",
"pageBundle": false,
"fields": [
{
"title": "Title",
"name": "title",
"type": "string",
"required": true
},
{
"title": "Session",
"name": "session",
"type": "contentRelationship", // This is the new field type
"contentTypeName": "session", // Name of the content-type to link
"contentTypeValue": "slug", // The type of link/value you want to add. This can be slug, or path.
"required": true
},
{
"title": "Session path",
"name": "sessionPath",
"type": "contentRelationship",
"contentTypeName": "session",
"contentTypeValue": "path",
"required": true
}
]
}
] @adrian-ub, feel free to give it a try. |
@estruyf thanks for the early development, I have tested the implementation, it works correctly when the slug en property is set in the content configuration in json file: Content without field slug With field slug: Example: https://github.com/adrian-ub/experiment-relationship-fronmatter try to do it with pageBundle, but it gets me information from another contentType |
I just did a minor fix to generate the slugs only in memory. That way, it will not get the To use it, first run the |
Discussed in #583
Originally posted by adrian-ub May 9, 2023
Relationship like Netlify CMS
https://decapcms.org/docs/widgets/relation/
The text was updated successfully, but these errors were encountered: