Click or drag to resize

IGlobalVariable Interface


Represents the Global Variable entry. As the name indicates, global variables are placeholders that hold specific values They can be used in any part of an element value or attribute. The purpose of this object is to allow static information that is repeated across multiple pages or fields to be editable in only one place.

Global variables always have a global value, which applies to all publishing targets. They may also contain override values for specific publishing targets. During publish, these override values are used for the publishing targets to which the global variables belong.

Global variables are defined in the CMS and undergo value replacement in the DSS.

Namespace:  Ingeniux.CMS
Assembly:  Ingeniux.CMS.CSAPI (in Ingeniux.CMS.CSAPI.dll) Version: 10.6.308
Syntax
public interface IGlobalVariable

The IGlobalVariable type exposes the following members.

Properties
  NameDescription
Public propertyGlobalValue
Gets and sets the variable's global value. This value is used if a specific publishing target has no override value.
Public propertyName
Gets and sets the name of the variable.
Public propertyVariableType
Gets and sets the variable's type. This is a sort of categorization for the variable; this value doesn't affect runtime. Default is "text".
Public propertyXPathQuery
Gets and sets whether the value of the global variable is based the result of XPath query
Top
Methods
  NameDescription
Public methodRemoveTargetSpecificValue
Removes a override value for a given publishing target.
Public methodSetTargetsSpecificValue
Sets the override value for specific publishing targets.
Public methodValue
Gets the value for a specific publishing target. If no override value exists for this publishing target, returns the global value.
Top
Examples

Global variables are retrieved via the Global Variables Collection manager object.

C#
IGlobalVariable copyRightVar = session.GlobalVariables.Variable("CopyRight");

See Also