Defining your data model in Sitecore Content Hub
Sitecore Content Hub is an efficient platform for keeping all your digital assets in a centralized repository. It offers an immense amount of flexibility with tagging, security settings, and workflows.
When defining the data model of your assets, it is important to understand the different field types available in Content Hub. In Content Hub, data models are defined using schemas. In the management section of your Content Hub instance you will find the following icon:
Once you have clicked on this icon, you will be prompted with a list of all different schemas available.
For digital assets, such as images and other files, the schema you will want to edit is M.Asset. Clicking on this schema will provide you with all the different field groups it has by default. From here, you can click on “New group” to create your custom set of metadata fields.
Fields are identified as members of a group. Clicking on “New member” in your custom group will let you create your new field and select its data type:
The available data types are:
- Datetime offset
- Option List
String, Boolean, Integer, Long, Decimal, and Datetime are pretty much self-explanatory by their names. The last three require a little bit of explanation.
Datetime Offset is explained in Content Hub’s documentation site as the following:
“Offset DateTime is a representation of a date and time with an offset. The offset is from UTC/Greenwich. For example, Jun 7, 2021 2:51 PM +02:00.”
Option Lists are very helpful when you need to have a pre-defined list of options available to content contributors. From the Management screen click on Option Lists:
There you can define the options you want to have available to your content contributors and select that list in your option list field.