Was this article helpful?
Thanks for your feedback
You can add a Reference field within a Global field while creating a Global field’s schema. You can then use this Global field in any content type.
Let’s look at an example to understand how developers can use Reference fields within the Global fields.
For instance, you need a website to frequently show author details along with each blog article on every blog post of a popular magazine. Furthermore, you need to make sure that the author information referenced for each blog post stays consistent across every blog written by a particular author.
To achieve this, you can create a child content type named “Author Details” that contains a “Single Line Textbox” field for the author’s name, a “Multi Line Textbox” field for the author’s address, and a “Rich Text Editor” field for the Author’s qualification details. Then create the parent content type, “Blogs" containing the header and footer content.
Now, create a Global field named “Blog Post”. Within this Global field, add the following fields:
To deploy referenced author details from the child entry consistently across the “Blog” parent content type, simply refer to the “Blog Post” Global field within the parent content type’s entries.
Let us understand how developers can work with Reference fields within Global fields.
To add a Reference field to the Global field, login to your Contentstack account, go to your stack, and perform the following steps:
Additional Resource: Learn more about the difference between Single and Multiple Content Type Referencing.
Note: You can add only those Reference fields that refer to multiple content types to your Global fields.
Was this article helpful?
Thanks for your feedback