Introduction:
Sitecore, a powerful content management system (CMS), provides various field types to manage and store content. Among the field types available, three commonly used options are versioned fields, shared fields, and unversioned fields. Each field type serves a specific purpose and offers distinct advantages. In this blog post, we will delve into the differences between versioned, shared, and unversioned fields in Sitecore, helping you make informed decisions when structuring your content architecture.
Versioned Fields:
Versioned fields are designed to store content that needs to be managed separately across different language versions or a number of versions of an item.
By default, every field in Sitecore is a versioned field. These fields can have separate language versions and several numbered versions for each language version. To mark a field as versioned, do not check the Shared and Unversioned checkboxes while creating the template.
For example, if you have a “Title” field marked as versioned, you can have different titles for an item in English or any other supported language.
Key points about versioned fields:
- Each language version or item version can have a distinct value for versioned fields.
- Suitable for managing content across different languages or numbered versions.
- Content authors can make language-specific changes without affecting other versions.
Shared Fields:
Shared fields, as the name suggests, are fields that share the same value across all language versions or numbered versions of an item.
In the template field, we need to check the Shared checkbox to make a field ‘Shared’. The data in the shared fields are shared among all languages and all numbered versions. So if you change one language version of an item, it will reflect in other languages and their numbered versions.
These types of fields are used mainly if there is some data whose value does not need to be versioned at all, such as the creation date.
Key points about shared fields:
- Shared fields have a single value shared across all language versions or numbered versions.
- Suitable for storing information that remains consistent across all versions.
- Updating a shared field value automatically updates it in all versions of the item.
Unversioned Fields:
In the template field, we need to check the Unversioned checkbox to make a field unversioned. The data in the unversioned fields is separate for each language version, but all the numbered versions share the same data. Select this type of field if you need to maintain different data for different languages but do not need numbered versions. Like an author’s name field, as it could be different in different languages and you might have decided not to maintain numbered versions.
Key points about unversioned fields:
- Unversioned fields share the same value across all versions but allow different language versions to have separate values.
- Suitable for storing information that remains consistent but requires language-specific values.
- Updating an unversioned field value affects all versions, but language-specific values can be different.
Conclusion:
Understanding the differences between versioned, shared, and unversioned fields in Sitecore is crucial for structuring your content architecture effectively.
Versioned fields provide language-specific or version-specific content, enabling personalization and localization. Shared fields ensure consistency by sharing a single value across all versions, reducing redundancy. Unversioned fields strike a balance by sharing a value across all versions while allowing language-specific variations. By leveraging these field types appropriately, you can optimize content management in Sitecore and create dynamic and tailored experiences for your audience.
You can check our other blogs related to Sitecore :
- Sitecore Roles and Access Permissions with Azure AD
Sitecore Security Domains: A Guide to Managing User Access and Permissions