InsertLinkToOtherLanguage Class Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Writes a link to an MLC sibling document of the current document (or the root document if the current document is an include), and writes it to the supplied stream or the default response stream. The InsertLinkToOtherLanguage class acts as the underlying engine for the Insert link to other language AS component.
Inheritance Hierarchy

SystemObject
  ContentStudio.SiteCodeBase
    ContentStudio.Site.ActiveScriptingActiveScriptingBase
      ContentStudio.Site.ActiveScriptingMLCBase
        ContentStudio.Site.ActiveScripting.MLCInsertLinkToOtherLanguage

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

public class InsertLinkToOtherLanguage : MLCBase

The InsertLinkToOtherLanguage type exposes the following members.

Constructors

  NameDescription
Public methodInsertLinkToOtherLanguage
Constructs a new instance of the InsertLinkToOtherLanguage class that writes to the default response stream
Public methodInsertLinkToOtherLanguage(Stream)
Constructs a new instance of the InsertLinkToOtherLanguage class that writes to the supplied stream
Top
Properties

  NameDescription
Public propertyBackwardsComponentCompatibilityMode
Sets or gets a value that indicates whether the code runs in backwards compatibility component mode. The default value is false.
(Inherited from ActiveScriptingBase.)
Public propertyClassName
Gets or sets the a name of a CSS class name to use with the displayed link. The default value is an empty string, that will omit the attribute.
Public propertyComponentName
Gets the name of the component
(Overrides ActiveScriptingBaseComponentName.)
Public propertyConformance
Gets a value which specifies which type of code a component can generate.
(Overrides ActiveScriptingBaseConformance.)
Protected propertyCode exampleCS_DataFields
Gets a EPTXmlParser that contains a collection of EPT field definitions and values. This property is the replacement for the obsolete EPT_GetFieldName(String) and EPT_GetFieldValue(String) methods.
(Inherited from CodeBase.)
Public propertyElementType
Gets a value which specifies the type of outer element the component generates.
(Overrides ActiveScriptingBaseElementType.)
Public propertyEncoding
Sets or gets the encoding the component uses. The default encoding is the UTF8 encoding without byte order mark.
(Inherited from ActiveScriptingBase.)
Public propertyImageAlt
Gets or sets the ALT attribute of the image. The default value is an empty string.
Public propertyCode exampleImageAttributes
Sets or gets optional attributes for the generated image element in the link. The default value is an empty string.
Public propertyLanguageCode
Gets the language code used. By default this property is "neutral" and set when the LanguageXml property is set.
(Inherited from MLCBase.)
Public propertyLanguageID
Gets the language id used. By default this property is 1 (neutral) and set when the LanguageXml property is set.
(Inherited from MLCBase.)
Public propertyLanguageName
Gets the language name used. By default this property is an "(Language neutral)" and set when the LanguageXml property is set.
(Inherited from MLCBase.)
Public propertyLanguageXml
Sets or gets a value that indicates an MLC-language used by the document to insert. This is indicated as an XML fragment in the format: <r><id>NNNNN</id><name>Language name</name><languagecode>LL</languagecode></r> Where NNNNN is the numeric LanguageID and LL is the language short string The default value is "<r><id>1</id><name>(Language neutral)</name><languagecode>neutral</languagecode></r>" When you set this property the LanguageID, LanguageName and LanguageCode properties are set to the language indicated by the XML fragment.
(Inherited from MLCBase.)
Public propertyCode exampleLinkAttributes
Sets or gets optional attributes for the generated link. The default value is an empty string.
Public propertyLinkImage
Sets or gets the URL of the link image. The default value is an empty string, which will omit the image element entirely.
Public propertyLookupPresentationTemplate
Sets or gets a value that indicates if Content Studio should do an MLC lookup on the presentation template. The default value is true. If this property is true, the presentation template must be an MLC member or located in an MLC member category.
Protected propertyPage
A reference to the current context page. This will initialize in the constructor of this class.
(Inherited from CodeBase.)
Protected propertyPresentationTemplateSiblings
Returns a collection of presentation template siblings connected to the current document's presentation template. The first time this property is called the collection is create and filled with the siblings of the current presentation template.
(Inherited from MLCBase.)
Protected propertyReferrerSiblings
Gets a collection of MLC siblings for the referring page.
(Inherited from MLCBase.)
Protected propertyRunningUserControl
Gets the current running user control.
(Inherited from CodeBase.)
Protected propertySiblings
Returns a collection of siblings connected to this document. The first time this property is called the collection is create and filled with the siblings of the current document. To fill the collection with siblings for another document use the LoadDocumentSiblings method before calling this property.
(Inherited from MLCBase.)
Public propertyTarget
Gets or sets the TARGET attribute of the link. The default value is an empty string, which will omit the attribute.
Public propertyText
Sets or gets the text to display in the generated link. The default value is an empty string.
Public propertyTitle
Sets or gets the TITLE attribute of the generated link. The default value is an empty string, which will omit the attribute.
Public propertyUseRootDocument
Sets or gets a value that specifies if the root document, retrieved from the query string, should be used when finding a suitable MLC sibling. The default value is false (using the current document).
Top
Methods

  NameDescription
Protected methodBuildHTMLComponentException
Returns an component exception in HTML format.
(Inherited from ActiveScriptingBase.)
Protected methodBuildLink
Returns the link to be inserted. This method is called by the Invoke method.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Protected methodGenerateLinkTargetAttribute
Returns the attribute string to be written to the link.
(Inherited from ActiveScriptingBase.)
Protected methodGetCorrectField
Extracts the correct value from a passed in EPT field name and a static field value.
(Inherited from ActiveScriptingBase.)
Protected methodGetDocumentLanguage
Returns the language of the an MLC documents.
(Inherited from MLCBase.)
Public methodGetHashCode (Inherited from Object.)
Protected methodGetMLCDocumentSibling
Returns the sibling document to the specified document that has the language indicated by the LanguageID property.
(Inherited from MLCBase.)
Protected methodGetMLCDocumentSiblingByLanguageCode
Returns the sibling document to the specified document that has the language code specified.
(Inherited from MLCBase.)
Protected methodGetSiblingCollection
Returns a collection of siblings given a document identifier.
(Inherited from MLCBase.)
Public methodGetType (Inherited from Object.)
Public methodInvoke
Invokes the component and writes its content into the specified stream. You can override this method to generate your own link generation.
(Overrides MLCBaseInvoke.)
Protected methodLoadDocumentSiblings
Loads the Siblings collection with MLC siblings for a specific document. If the collection already exists and is filled it will be recreated an refilled.
(Inherited from MLCBase.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodReadFromApplicationCache
Returns data that is read from the application cache.
(Inherited from ActiveScriptingBase.)
Protected methodSetApplicationCache
Stores a string in the application cache.
(Inherited from ActiveScriptingBase.)
Protected methodSetLanguage(Int32)
Sets the correct MLC language information if you have the Language identifier. This method will set the LanguageXml, LanguageID, LanguageName and LanguageCode properties
(Inherited from MLCBase.)
Protected methodSetLanguage(String)
Sets the correct MLC language information if you have the Language code. This method will set the LanguageXml, LanguageID, LanguageName and LanguageCode properties
(Inherited from MLCBase.)
Protected methodSyncronizeMLC
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.
(Inherited from ActiveScriptingBase.)
Public methodToString (Inherited from Object.)
Protected methodWriteAttribute(TextWriter, String, String)
Writes an attribute string to the supplied stream, unless Value is an empty string or null
(Inherited from ActiveScriptingBase.)
Protected methodWriteAttribute(TextWriter, String, String, Boolean)
Writes an attribute string to the supplied stream.
(Inherited from ActiveScriptingBase.)
Protected methodWriteLink
Writes the link based on the property set of the component and the supplied link. The TextWriter can be the response stream or a user defined StreamWriter. Use the SiteBase.WriteResponse.GetStreamWriter() method to create a suitable writer. The output text is HTML encoded before it is written to the output stream. This method is called by the Invoke method.
Top
Remarks

This class is MLC aware, and can only be used in MLC member documents. To use this class, create an instance of this object, set up the properties and call the Invoke method with an appropriate set of parameters. This class can throw exceptions, thus your code should be wrapped within try/catch statements in order to avoid the entire page to crash. This class generates inline code, thus you must wrap it into a block element to make the page validate according to the HTML/XHTML regulations. The generated code is fully HTML/XHTML strict compatible.
See Also

Reference