CategoryReaderGetProperties Method Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Returns selected properties of a Content Studio category.

Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)

public string GetProperties(
	ConnectionId connectionId,
	SessionId sessionId,
	CategoryId categoryId,
	string[] properties


Type: ContentStudioConnectionId
A value that identifies the web site
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId).
Type: ContentStudio.DocumentCategoryId
The category to read properties for
Type: SystemString
An array of names of the properties to be read. These names are not case-sensitive.

Return Value

Type: String
XML with the returned properties as attributes.
  <category PROPERTY="VALUE" />

The PROPERTY is the name of the property to read and the VALUE is the found value. You will find one attribute for each property you requested. The casing of these attribute names are identical to the casing of the passed in names and the attributes will be ordered in the same order as the order in the passed in list.


CSExceptionA business rule was violated in the underlying Content Studio database
CSPermissionDeniedExceptionThe caller has no permission to perform the requested action
CSInvalidSessionExceptionThe session is invalid
CSInvalidParameterExceptionA parameter has an invalid value
CSDocumentNotFoundExceptionThe category could not be found
SqlExceptionAn error occurred when executing the command against the Content Studio database
ArgumentNullExceptionproperties parameter is null - or - one of the property names is null
ArgumentOutOfRangeExceptionThe properties parameter is an empty array
Content Studio permissions

READ permission on the category is required.

This method was introduced in Content Studio version 5.2

Note Note
Internally, the properties are fetched by the use of a dynamically, parameterized sql query where all passed in property names are checked individually against the database. For this reason asking for a large number of properties can be time consuming and will result in many small database calls. For this reason you should try to limit the number of properties as much as possible. If you need to read a lot of properties consider using the GetItem(ConnectionId, SessionId, CategoryId) method instead. However, for a very limited number of properties this method can be very efficient.

The following property names are available:

Property names and their values
The numeric internal identifier of the category
Indicates the type of document can be stored in the category
For more information about this property, see the ModuleName property.
the name of the category
BodyProperties String:
value that indicates the attribute content of the document's BODY tag.
This value is applied to every document in the category unless there is a definition of BodyProperties for the document itself.
This property is meaningful for categories with meta data only.
A bit-masked value that indicates the status of the category.
These flags can be a limited combination of the following hexadecimal values and meaning:
0x00000004Containing documents have revision history
0x00000010Containing documents are Html template type
0x00000040The category and its containing documents are protected by the system
0x00001000Containing documents are plain text documents
0x00002000Containing documents do not have meta data
0x00008000Containing documents are binary, uploaded file
0x00040000Containing documents are edit templates
0x00080000Containing documents are presentation templates
The textual representation of the statusInt property.
The numerical identifier of the unit that stores this category
An identifier to the documents that acts as EditTemplate of the category. For EPT documents categories only.
Identifies the document that acts as default start document of the category.
The identifier of a registered user that created the document.
Not used in Content Studio 5
A identifier to the document that acts as the template for documents in this category.
Indicates that the category only can contain presentation templates.
Indicates that the category only can contain editing templates.
The encoding used for documents in this category.
An identifier that defines the parent category of this category. For root categories this value points to the category itself.
Used internally by the image processing module.
Used internally by the image processing module.
Indicates that the category's MLC type.
  • 0 - The category is not an MLC member.
  • 1 - The category is an MLC master.
  • 2 - The category is an MLC member.
Indicates the MLC language of this category.
MLCLanguageShortName String:
Indicates the MLC language of this category. This value is empty for non MLC members.
MLCLanguageName String:
Indicates short form of the MLC language of this category. This value is empty for non MLC members.
Defines the maximal number of documents that can be created in the category. The default value is zero (0) which indicates that no limit exists.
Currently (version 5.2), Content Studio API has no write support for this column, however Content Studio honors this property if specified.
A brief description of this category.
A value that increments with one for every new document created in the category
A value that indicates whether to use publish date information when listing documents.
An internal global unique object identifier of the category
For internal use only
True (1) to use server side validation in EPT. For EPT document categories only.
Not used
True (1) to indicate that EPT meta data security is enabled for this category
A URL that defines the source code for a alternate view in the GUI of this category.
A comma-separated list of file extensions that are allowed with this.
defines the maximum content size of any document in the category. Zero (0) is no limit.
Currently (version 5.2), Content Studio API has no write support for this column, however Content Studio honors this property if specified.
DocumentFileNamingConvention Integer:
A value that defines how Content Studio specifies file names for documents in this category.
For more information on this value see the FolderBaseDocumentFileNamingConvention enumeration.
FilePath String:
The path of this category. The path is relative to the root. e.g. System/AS_Date

Note Note
If you need to determine the type of documents that can be stored in the category you must analyze a combination of both the ModuleName and StatusInt properties. However, you should use the GetDocumentType(ConnectionId, SessionId, CategoryId) method instead which is much easier and safer to use.


The following code snippet shows how to get some document properties for the category with id=4500

CategoryId catId = 4500;
CategoryReader catReader = new DocumentReader();
string xml = catReader.GetProperties(CS_ConnectionId, 
                                     new string[2] {"CategoryName",
//The following Xml is returned
// <status>0</status>
// <statustext>Success</statustext>
// <category CategoryName="The category" 
//           ParentCategoryID="3644" />
int ParentID = 0;
string Name = String.Empty;
//use an XmlReader to the the individual properties returned
using (StringReader sr = new StringReader(xml))
  XmlReader XReader = XmlReader.Create(sr);
  if (XReader.ReadToFollowing("category"))
     ParentID = Int32.Parse(XReader.GetAttribute("ParentCategoryID"));
     Name = XReader.GetAttribute("CategoryName");
//Write out the data to the web page
Response.Write(String.Format("The category {0} has a parent with id {1}.", Name, ParentID));
See Also