OpenWGA 7.7 - TMLScript reference

WGA
Method :

design()
design(scriptObject)
design(db)
design(dbkey)

On object WGA
Usage Returns a design context object for the given parameter resource
Description

This method has numerous variants to allow the retrieval of a design context by all possible indicators. The design context for the current script is available when using this method without parameters.

Parameters

Variant 1:

This variant has no parameters and returns the design context of the running script. Using local references will be possible if the script is from a TMLScript module and will use resources on the same folder level as the script. Note that if the current code is part of a custom TMLScript object this does not return the design context for the object but for the script using the object. In order to get the context of the object you need to use variant 2 and pass the TMLScript object as parameter.

Variant 2:

scriptObject (Custom TMLScript object):

A custom TMLScript object for which to build a design context. The context will represent the design of the application that contains the object definition. Using local references will be possible and will use resources on the same folder level as the script object.

Variant 3:

db (WGAPI database object):

The database object of the application whose design the design context should represent. This will fail if the current user has no access to the application.

Variant 4:

dbkey (String):

The database key of the application whose design the design context should represent. This will fail if the current user has no access to the application.

Return value A design context for the given parameter resource
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • TMLScript tasks in jobs
  • Content type events