Creating and Managing datatypes

Before you learn how to create datatypes, you will have a brief overview of different kinds of datatypes available in Experience Management. You will also find out about general properties of global datatypes and learn how to add items to these datatypes and make the datatypes available for use in the Content module.

datatypes

Experience Management datatypes allow you to store structured data and reuse it on your websites.

The data you can reuse in Experience Management has its scope of visibility. Global data can be accessed and reused across multiple websites and web pages. Page data and metadata is available within one web page.

Experience Management provides you with three kinds of datatypes:

Global datatypes
Page datafolders
Page metatypes

The Global datatypes represent data reusable across all web pages on all web sites created in Experience Management.

The Page datafolders represent data associated with one specific page. When created, this datatype results in a data folder linked to the page and the editor can store page-specific data in this folder. The data in one page datafolder is not available for other web pages.

The Page metatypes represent flexible metadata structures assigned to a page or a section of the website.

The primary focus of this guide is on global datatypes, which allow you to store and reuse data across multiple web pages.

In the following few chapters and sections you will learn how to create global datatypes, how to set their properties, how to add fields to these datatypes and how to use forms with datatypes on web pages.

Creating Global datatypes

While creating a datatype, first, you should set the properties all global datatypes share. Then, you should add fields to the datatype and set properties of each field added.

To create a Global datatype:

1. In the Data Navigator, select Global datatypes and click Add datatype on the toolbar. The datatype settings editor opens in the working area.
2. On the Settings tab, set the datatype’s general properties such as its Title, Type name, Type namespace.


3. On the Fields tab, click Add Field and on the Basic tab of the field settings editor, set the field’s basic properties

4. If necessary, click the Advanced tab and set the field’s advanced properties.

5. Repeat Steps 3 and 4 for as many fields as you need to add.
6. Save the datatype.

The datatype appears under Global datatypes in the Data Navigator.

General Properties of datatypes

The general properties of a datatype are grouped on the datatype’s Settings tab. The following is the list of these properties:

Global datatypes: General Properties

Property

Description

Title

A user-friendly name of a global datatype used in most GUIs in Experience Management. This name appears in the Data Navigator when the datatype is saved.

Type name

A technical name of a global datatype mostly used in code. It cannot be changed once used externally.

Type namespace

A namespace to group several datatypes together. This name appears in the Data Navigator if new when the datatype is saved. Otherwise, the datatype appears under the existing namespace specified.

Short URL name

When provided, it allows the data items of this type to be referenced in content. See Internal Data Link Formats for more information.

Has caching

When checked, this option indicates that the data of this type will be cached.

Has publishing

When checked, this option indicates that the data items added to this datatype will need publishing manually. When cleared, it indicates that the data items will be published automatically once saved.

Is localizable data

This option appears only if two or more locales (languages) are installed in C1 CMS. When checked, this option indicates that the datatype can be localized.

Making Global datatypes Available in Content module

Editors do not need to necessarily have access to the Data module in Experience Management, particularly if they do not create datatypes but only use them. For this purpose, the existing global datatypes can be made available in the Content module.

To make global datatypes available in the Content module:

1. In the Data Navigator, locate and right-click the datatype you need.
2. In the context menu, click Show in Content module.

3. Switch to the Content module. The global datatype is now available here under Data.

4. If you right-click the datatype in the Data module again, you will see a check mark next to Show in Content module, which indicates that this datatype is already available in the Content module.

By clicking this menu command again, you will remove this datatype from the Content module. The datatype itself will remain untouched in the Data module.

Adding Data Items

Once you have created a global datatype, you should fill it with structured data that will be available across your websites on all the web pages.

You can fill the global datatype by adding data items to it. When adding a data item, you enter values in the fields added to this datatype. Each datatype has its own set of fields.

You can add data items not only in the Data module but also in the Content module if you make the datatype available in the Content module.

By using input forms on the web pages, you can allow the users who visit your websites to fill the datatypes with data from their web browsers.

To add a data item:

1. In the Data Navigator, locate and select the datatype you want to add a data item to.
2. Click Add Data Item on the toolbar. The datatype item editor opens in the working area.
3. Fill out the datatype fields.

4. Click Save. The data item will appear under this datatype.