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

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

Provides support for components that needs to be MLC aware, by localizing the supplied category or presentation template from the current document, or the preferred language of the visitor.

Namespace: ContentStudio.Site.ActiveScripting
Assembly: CS_SiteLib (in CS_SiteLib.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

protected void SyncronizeMLC(
	bool useRoot,
	bool checkLanguageCookie,
	bool allowNonMlcParent,
	ref int selectedCategory,
	ref int presentationTemplate
)

Parameters

useRoot
Type: SystemBoolean
Specifies the if root document should be checked (makes a difference only if the current document is an include).
checkLanguageCookie
Type: SystemBoolean
Specifies if the code can get the localized version from the the cookie CS_Language.
allowNonMlcParent
Type: SystemBoolean
Specifies if is should be acceptable to use a presentation template that not is an MLC document.
selectedCategory
Type: SystemInt32
The MLC category member that should be localized. This parameter will be updated with the localized version of the MLC category, when the method returns.
presentationTemplate
Type: SystemInt32
The MLC presentation template to be localized. Pass zero if the presentation template does not exists or should not be localized. Otherwise,this parameter will be updated with the localized presentation template, when the method returns.
Exceptions

ExceptionCondition
CSException One of the following conditions:
  • 1001 - The SessionID is invalid.
  • 1002 - Permission denied.
  • 1009 - Invalid parameter value.
  • 1100 - The document does not exist.
  • 1503 - The category does not exist.
  • 1558 - The document is not an MLC member document.
  • 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.
  • 1838 - The document is not published.
InvalidOperationExceptionCannot determine the MLC language and the actual document is not an MLC document.
SqlExceptionAn error occured when executing the command against the Content Studio database
Remarks

More specialized components that work with MLC can be inherited from the MLCBaseclass. The method determines the language to be localized i the following order.
  1. If checkLanguageCookie is set, use a cookie named CS_Language.
  2. If a language code named lang is supplied in the query string, use that value,
  3. If the language is defined in the current document, use that value.
  4. If useRoot is set, use the language of the root document.
Browse permission is required on the documents, and anonymous callers are supported.
See Also

Reference