Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
The id of the category created.
Create Container permission on the parent container is required to create a category.
[This is preliminary documentation and is subject to change.]
Creates a category in Content Studio and in the underlying file system.
Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public int Create( ConnectionId connectionId, SessionId sessionId, DocumentTypes documentType, string categoryName, CategoryId parentCategoryId, UnitId unitId, bool searchable, bool useServersideValidation, DocumentId startDocumentId, DocumentId defaultTemplateId, string bodyProperties, string description, string guoid, CategoryManagerUseMetaSecurity useMetaSecurity, DocumentId editTemplateId, string customViewUrl )
Parameters
- connectionId
- Type: ContentStudioConnectionId
A value that identifies the web site - sessionId
- Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId). - documentType
- Type: ContentStudio.DocumentDocumentTypes
The document type of the category. Document types can be saved but this is generally not recommended. If you set the document type to None an error occurs. - categoryName
- Type: SystemString
The name of the category. This parameter cannot be empty. - parentCategoryId
- Type: ContentStudio.DocumentCategoryId
The parent category that should act as a parent of the new category. This parameter can be zero if there is no parent category in this case the UnitID parameter must be a valid unit. - unitId
- Type: ContentStudio.DocumentUnitId
An existing unit that will host the category. If a ParentCategory has been specified this parameter is ignored and can be set to zero. - searchable
- Type: SystemBoolean
Indicates that the category can be used in unit-wide full-text search operations. - useServersideValidation
- Type: SystemBoolean
Set this parameter to true to use the built in server side validation of EPT-data. - startDocumentId
- Type: ContentStudio.DocumentDocumentId
The document that is used as start document of the Category. This parameter can be zero if the category does not have any start document. - defaultTemplateId
- Type: ContentStudio.DocumentDocumentId
This is the template document that acts as the default template of the category. This parameter can be zero if no template exists. - bodyProperties
- Type: SystemString
Data that will be placed in the body tag of the containing documents. The parameter cannot exceed MAX_BODYPROPERTIES_SIZE characters in length but can be null to use the default value which is an empty string. - description
- Type: SystemString
A short string description of the category. This parameter cannot exceed MAX_DESCRIPTION_SIZE characters in length but can be null to use the default value which is an empty string. - guoid
- Type: SystemString
A unique identifier from a copied category. This parameter must be a valid GUOID or null and is only used by the Content Studio advanced copying functionality. - useMetaSecurity
- Type: ContentStudio.DocumentCategoryManagerUseMetaSecurity
Set to true to use meta data security with this category. False turns off this functionality - editTemplateId
- Type: ContentStudio.DocumentDocumentId
If the document is an ept-document EditTemplateId must be supplied. Otherwise set to 0 - customViewUrl
- Type: SystemString
Defines a custom view to use in cs-admin
Return Value
Type: Int32The id of the category created.
Exceptions
Exception | Condition |
---|---|
CSException | A business rule was violated in the underlying Content Studio database |
SqlException | An error occurred when executing the command against the Content Studio database |
ArgumentOutOfRangeException | A value was passed in that lies outside of the acceptable data range. |
Content Studio permissions
See Also