Data types using C#

Manually adding a new meta data category (tab)

By default, a “Meta Data” category (tab) exists in C1 CMS. If no new categories are added, then all meta data added through the UI will be added to this category. It is possible to create and add a new category to C1 CMS. Below is an example of how to add a new meta data category. You can use your own categories when you are adding meta data to a page manually.

Minimal Example

using (DataConnection connection = new DataConnection())
{
    ICompositionContainer compositionContainer = DataConnection.New<ICompositionContainer>();
    compositionContainer.Id = Guid.NewGuid();
    compositionContainer.Label = "My Container";
    compositionContainer = connection.Add<ICompositionContainer>(compositionContainer);
}