OpenWGA 5.4 - TMLScript reference


Object:

Design

Description

The Design object represents a design context in TMLScript and offers various related functionalities.

The TMLScript design context points to the OpenWGA design in which the current script is defined and from which it fetches additional script resources. For example if a script calls another WebTML action then the design context is responsible for retrieving the action code from the same OpenWGA design that also defines the calling script.

A design context may hold additional location information that is used by the current script to fetch the "right" resources, like the folder of the scripts definition which is used to resolve "local references" that begin with "::".

Retrieval Via method WGA.design()
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events
Properties and methods
Name Purpose
callAction([context], actionID, [param1, .... param5]) Calls a WebTML action
createObject(modulename [, param1, ...paramN])
createObject(objectDef [, param1, ...paramN])
Creates a custom TMLScript object
getGlobal(name) Returns a TMLScript global that is available for the current design
getLabelBundle([[container, ]file, ] language) Retrieves all labels of a label file from the design in a specific language
isCustomized() Shows if the current design uses a customization
loadObjectDefinition(moduleName) Loads the definition of a custom TMLScript object from the design
db() Returns the WGAPI database object for the application of the current design
label([[String container,] String file,] String key [, List params]) Returns a WebTML label from the current design
plugin() Returns the Plugin object for the OpenWGA plugin that provides the current design
registerDbGlobal(name, ref) Defines a "TMLScript global" variable with a scope limited to the current design
registerGlobal(name, ref) Defines a "TMLScript global" variable