Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
A MLCMemberInformation containing MLC member data
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.
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
[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: MLCMemberInformationA MLCMemberInformation containing MLC member data
Exceptions
Exception | Condition |
---|---|
CSException |
One of the following conditions
|
SqlException | An error occurred when executing the command against the Content Studio database |
Content Studio permissions
Examples
- 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