Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
A MLCSiblingInformation containing MLC member data.
Browse permission is required on the document and anonymous callers are supported.
If there is no version of the document in the requested language the
DocumentID property will be zero.
[This is preliminary documentation and is subject to change.]
Returns information about localized version of an MLC document given the language of the localized version.
Namespace: ContentStudio.Document.MLC
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public static MLCSiblingInformation GetMLCSiblingInformation( ConnectionId connectionId, SessionId sessionId, DocumentId documentId, 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). - documentId
- Type: ContentStudio.DocumentDocumentId
The original document to get a localized version for. This document must exist. - languageCode
- Type: SystemString
The language identifier of the localized version to get information for.
Return Value
Type: MLCSiblingInformationA MLCSiblingInformation 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
Remarks
Examples
This code shows how can get information about a sibling document written in the Italian language and how to display it as an Html list in a Content Studio document. The code also checks whether there actually exists a version in Italian before reading any detailed information about the found sibling.
System.Text.StringBuilder sbu = new System.Text.StringBuilder(); sbu.AppendLine("<ul>"); try { ContentStudio.Document.MLC.MLCSiblingInformation sibi = ContentStudio.Document.MLC.MLCInformation.GetMLCSiblingInformation( CS_ConnectionId, CS_UserSessionId, CS_InsertedDocumentId, "it"); if(sibi.DocumentId > 0) { ContentStudio.Document.CSDocumentInformation docu = new ContentStudio.Document.CSDocumentInformation(CS_ConnectionId, CS_UserSessionId, sibi.DocumentID, CSDocumentInformation.ContentToLoad.None); sbu.AppendLine(String.Format(" <li>Document: {0} ({1})</li>", docu.DocumentName, sibi.DocumentID)); } else sbu.Append(" <li>There is no Italian version of this document</li>"); } catch(CSException cex) { switch(cex.Number) { case 1558: sbu.AppendLine(" <li>Error: The document is not an MLC document!</li>"); break; case 1561: sbu.AppendLine(" <li>Error: No support for Italian!</li>"); break; default: sbu.AppendLine(" <li>Error: {0}!</li>", cex.Message); break; } } catch(Exception ex) { sbu.AppendLine(String.Format(" <li>Error: {0}</li>", ex.Message)); } sbu.AppendLine("</ul>"); Response.Write(sbu.ToString());
See Also