Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
A MLCDocumentStatusInformation structure with information.
READ or BROWSE permission on the document is required. Anonymous callers are supported.
[This is preliminary documentation and is subject to change.]
Returns an MLCDocumentStatusInformation that contains MLC information for a document.
Namespace: ContentStudio.Document.MLC
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public static MLCDocumentStatusInformation GetDocumentInformation( ConnectionId connectionId, SessionId sessionId, DocumentId documentId )
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). - documentId
- Type: ContentStudio.DocumentDocumentId
The document to get MLC information for. This document must exist.
Return Value
Type: MLCDocumentStatusInformationA MLCDocumentStatusInformation structure with information.
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 following sample shows how to obtain MLC information for a specific document. The data is written as an Html list that contain
- the language of the document including the language code
- whether the document is a master or an ordinary member document
try { ContentStudio.Document.MLC.MLCDocumentStatusInformation msta = ContentStudio.Document.MLC.MLCInformation.GetDocumentInformation(CS_ConnectionId, CS_UserSessionId, CS_InsertedDocumentId); System.Text.StringBuilder sbu = new System.Text.StringBuilder(); sbu.AppendLine("<ul>"); if(msta.IsMlcDocument) { sbu.AppendLine(String.Format(" <li>Language: {0} ({1})</li>)", msta.LanguageName, msta.LanguageCode)); sbu.AppendLine(String.Format(" <li>Master document: {0} ({1})</li>)", msta.MasterDocumentName, msta.MasterDocumentID)); sbu.AppendLine(String.Format(" <li>Document is: {0}</li>", (msta.Role == 1 ? "Member" : "Master"))); } else sbu.AppendLine(" <li>The document is not an MLC document</li>"); sbu.AppendLine("</ul>"); Response.Write(sbu.ToString()); } catch(Exception ex) { sbu.AppendLine(String.Format("<h3>Error: {0}</h3>", ex.Message)); }
See Also