Skip to main content
Function GetAbs()

Retrieve a key's value from the top level of the execution context without checking lower levels of the context

Erik avatar
Written by Erik
Updated over a year ago

Use GetS(name) to retrieve the value of the name key from the top level of the execution context if it exists. If the name key in a lower levels of the execution context, it will not be returned.

When using Twig variables to retrieve a key's value, it is impossible to know if the key is located at the top level of the execution context or at a lower level. If you need to get the value of a key located specifically at the top level, use GetAbs().

How to use

Use the function in the following way:

GetAbs(name)

Input

  • name: the name of the variable (execution context key) whose value to retrieve.

Output

The value of the name key, or null if the key does not exist.

Examples

GetS("myVar")

See also

Did this answer your question?