Click or drag to resize

ISchemaManagerCreateAssetSchema Method


Creates a new asset schema.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.308
Syntax
IAssetSchema CreateAssetSchema(
	string name,
	string friendlyName,
	int icon,
	AssetType type,
	string thumbnailPath = ""
)

Parameters

name
Type: SystemString
The new schema's root element name. This must be a valid XML element name.
friendlyName
Type: SystemString
The new schema's friendly name. This can be any name you choose, but it's recommended that you limit its length.
icon
Type: SystemInt32
An icon ID, which corresponds to an icon image.
type
Type: Ingeniux.CMSAssetType
Type of the asset being created.
thumbnailPath (Optional)
Type: SystemString
Optional file path for the new schema's thumbnail.

Return Value

Type: IAssetSchema
The newly created schema.
Exceptions
ExceptionCondition
ArgumentNullExceptionWhen the "name" parameter is null, empty, or contains whitespace.
ArgumentExceptionWhen the "name" parameter is not a valid XML element name; there are already schemas with same root name or friendly name; or the view name or style sheet name is invalid.
Remarks

The schema returned is not yet saved to the content store.

The "name" paramter provided cannot be null, empty, or contain whitespace, and it must be a valid XML element name.

The friendly names and root element names are unique to the schema's collection. If any schemas with a matching friendly name or root element name already exist, an error is thrown.

The newly created asset schema will be in draft mode. It cannot be used to create pages until it is saved with a new version.

If the icon ID provided doesn't match any icon images, it defaults to a blank page icon.

The newly created asset schema doesn't have any fields yet. Fields must be added to the returned object before saving (for more information, see UserWriteSession disposal).

The purpose of this parameter is for visual presentation only in the CMS schema designer user interface.

See Also