Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In Contentstack, as a Headless CMS, you work with a relational data management (see “Understanding Contentstack”). A relation between two datasets is called Reference.

A reference is a relation from one entry (dataset) to another in Contentstack. Even if two entries are referenced, both are remain independent in regards to editing, versioning etc.
Example: A simple webpage needs at least an entry of the type “Web Page” and one of the type “Content Block”. So both are “referenced” to each other.

If you reference an entry in another entry, the referenced entry itself stays independent. This means, all options can and must be used independently.

In a reference field, Contentstack allows you in a reference field to either (a) “Choose an existing entry” or (b) “Create a new entry”. In other words, if you see (a) or (b) you know that this is a reference field and thus you need to observe certain rules.

(a) “Choose an existing entry”
If you click this option, Contentstack provides you with a selection of possible Content Types and Entries to select. Once you selected an entry, the reference will be created between the selected entry and the entry where you are coming from.

...

(warning) If you create a new entry and you want to create a referenced entry in the same step, you will mostly miss the “Create a new entry” option. → Save you your just created entry and try again.
This is necessary because Contentstack needs the unique ID of the entry to be able to store the reference. This unique ID will be created by saving the entry for the first time.

(warning) If you want to re-use a referenced entry, but change some parts of it, please do not do it here, but take take care to copy it before you make any changes! → Copy with a new name and proceed as “normal”“usual”.

(warning) If you want to publish an entry with references, Contentstack will probably ask you, if you want to publish the entry with or without references. → Normally, you want to publish with references.
As already said, the referenced entries stay independent in regards to their edit and publish status. Technically, if you publish with references, Contentstack publishes multiple entries in one process.

(info) Please refer to “Organize Content in Contenstack” to learn more about the handling of referenced entries.

Reference a new entry in a new entry

...

Tip

If you miss the option to create a new entry from another entry, please provide the mandatory field values and save Save the entry. Now, you find the option “Create new entry”.

...

If there is an entry referenced, you can either edit this entry or remove the reference to add a new one.

...

  1. To edit the entry, click the left icon.

Note

If you edit an entry, it will be changed for all places where you have this entry referenced. If you are not sure about the existing references, click the edit icon to open the entry. Then click the left arrow icon on the top right side to see all references.

...

2) To change the entry reference, click the right icon to remove the reference to the entry. Once , this is done, you can add a new reference.

Info

If you change the reference to an entry, this does not impact the referenced entry. So, if you are not sure if you break something by changing the referenced entry, it might be better to create a new instead.

Instead of starting from scratch, you can also copy an entry and adapt the copy to your needs.
Just search for the entry in Contentstack and , open the context menu at the right (three dots) and click copy.

...