Fragment Scopes and Namespaces

As a fragment is designed to be scope-agnostic, it is unaware of the parent container scope and associated properties. This means that the fragment cannot access its parent's scopes (such as $page or $flow), call its chains, and so on. However, a fragment can access some scopes: $global (unified app in extensions), $application (for the older style of apps), and $extension (in extensions).

Within a fragment, there is a new local $fragment scope can be used within the fragment (this can be particularly useful when writing expressions):

  • $variables / $fragment.variables can be used to refer to the local variable in a fragment. $fragment.variables is needed for action chains.

Namespaces

Namespaces are used when referencing types in other scopes. The namespaces are similar to the scopes: global: / application: (for base apps), and fragment: for local scope.