MLCInformationGetMLCMemberInformation Method (ConnectionId, SessionId, CategoryId, String) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Returns information about an MLC member given its language code.

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

public static MLCMemberInformation GetMLCMemberInformation(
	ConnectionId connectionId,
	SessionId sessionId,
	CategoryId categoryId,
	string languageCode
)

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).
categoryId
Type: ContentStudio.DocumentCategoryId
Represents any member in an MLC
languageCode
Type: SystemString
The language code of the MLC member to get information about.

Return Value

Type: MLCMemberInformation
A MLCMemberInformation containing MLC member data
Exceptions

ExceptionCondition
CSException One of the following conditions
  • 1001 - The SessionID is invalid.
  • 1002 - Permission denied.
  • 1503 - The category does not exist.
  • 1554 - The category is not an MLC member.
  • 1555 - The MLC master could not be located.
  • 1561 - The language does not exists in the specified MLC.
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

Read or browse permission on the MLC master is required and anonymous calls are supported. However, the properties CategoryName, ModuleName and PathName of the returned MLCMemberInformation will be empty unless the caller has Read permission.
Examples

The code snippet below shows how to get MLC information about the a MLC member category with a specific language (Italian). The sample writes an Html table on a Content Studio document that contains
  • the category name combined with its id and whether the category is the master category
System.Text.StringBuilder sbu = new System.Text.StringBuilder();
sbu.AppendLine("<ul>");
try
{
   ContentStudio.Document.MLC.MLCMemberInformation memi =
        ContentStudio.Document.MLC.MLCInformation.GetMLCMemberInformation(CS_ConnectionId, 
                                                                          CS_UserSessionId, 
                                                                          CS_InsertedCategoryId, 
                                                                          "it");
   sbu.AppendLine(String.Format("<li>Category: {0} ({1}) IsMaster: {2}</li>", 
                                memi.CategoryName, 
                                memi.CategoryID, 
                                memi.IsMasterCategory ? "Yes" : "No"));
   sbu.AppendLine("</ul>");
}
catch (Exception ex)
{
    sbu.AppendLine(String.Format("<li>Error: {0}</li>", ex.Message));
}
sbu.AppendLine("</ul>");
Response.Write(sbu.ToString());
See Also

Reference