Creating Dynamic Data Types

Create dynamic data types in C1 CMS with the dynamic data type package fragment installer

The DynamicDataTypePackageFragmentInstaller can create dynamic data types – data types normally created in the CMS Console.

In the following example the content of the dataTypeDescriptor attribute has been omitted for readability. This attribute should contain a serialized data type descriptor.

 
<mi:Add
	installerType="Composite.Core.PackageSystem.PackageFragmentInstallers.DynamicDataTypePackageFragmentInstaller, Composite"
	uninstallerType="Composite.Core.PackageSystem.PackageFragmentInstallers.DynamicDataTypePackageFragmentUninstaller, Composite">
	<Types>
		<!-- dataTypeDescriptor: XML serialized data type descriptor -->
		<Type
 			providerName="GeneratedDataTypesElementProvider"
			dataTypeDescriptor="…" />
	</Types>
</mi:Add>

The <Types /> element

The Types element can contain none, one, or more Type elements, which denote a dynamic data type to be created in the system.

The Type element has the following attributes:

  • providerName: For regular dynamic data types, it should always be "GeneratedDataTypesElementProvider".
  • dataTypeDescriptor: A serialized data type descriptor in XML format.

TIP: When C1 CMS is compiled in debug mode, tree elements describing dynamic data types will have a command that produces the serialized data type descriptor XML required.