Workshop: Embedded module widget

This page discusses Workshop's Embedded Module widget. For an overview of Workshop embedding features, see the embedding overview page.

Configuration

The Embedded Module widget configuration allows a builder to select a module to embed, and define a mapping of variables in the current module to module interface variables of the embedded module.

Embedded module widget configuration

Module selection

To configure the embedded module widget, first select a child module to be embedded via the Compass resource selector. The published version of the child module will always be used when embedding.

Interface configuration

Once a child module is selected, the module interface for the child module will be shown in the widget configuration panel. This allows you to map parent module variables to child module interface variables. The parent module's variable definitions will be used to back variables that are fully shared between the parent and child modules. Any change to a variable value in either the child or parent module (for example, from a widget output or set variable value event) will be reflected in all modules where the variable is mapped.

Since the child module's variable definitions are not used for mapped variables, default variable values of mapped variables defined in the child module will not be used. Similarly, this means that any variable recalculation behaviors of mapped variables defined in the child module's variable definitions (such as usage of a function to back a variable value or variable transformations) will not be used. In the case of a reset variable value event, the variable's value will be reset to the default value set in the parent module's variable definition.