Custom Template Behaviors
To simplify repetitive configuration tasks, you can create your own Template Behaviors. These are sometimes referred to as Master Behaviors in Reactor (similar to a MasterSlide in PowerPoint or Keynote).
For example, suppose you want to create a custom behavior for an Encoder that performs a preset recall with a left turn and a preset store with a right turn. Additionally, you want the encoder to have a green ring light.
Once configured, you can reuse this encoder across multiple places in your configuration, controlling different preset IDs. This is a perfect use case for creating a Template Behavior.
Creating and Configuring Template Behaviors
Template Behaviors are a Tree Element and can be defined on a layer, following the usual scheme for Inheritance, as explained in the Tree Chapter.
To keep things simple, we recommend creating Template Behaviors on the global Root Layer of your configuration or the configuration layer related to your panel. In this example, we will use the second option. You can select the configuration layer related to your panel using the layer icon next to the Section Selector.
Next, add a Template Behavior. You can also use the "Copy From" function to copy the current behavior of a component into a new Template Behavior.
Afterward, you can configure your Template Behavior just like any other Behavior. 1
Using Constant Definitions to Add Fields to the Template Behavior
When creating Template Behaviors, it’s often useful to make certain parts of the nested configuration available at the top of the Behavior form. This is best done using Constants.
You can define Constants by adding Constant Definitions to your Template Behavior. Type a name for the new Constant (1) and press Create (2).
Once added, the new fields will be available at the top of the form (3).
Click on the definition to edit the properties of the new field. You can choose its type, add an extra label, and limit how many values it can hold.
Using a Custom Template Behavior
Once you have created your Template Behavior, you can use it in the Template Behavior field of any Behavior that inherits it.
Keep in mind that some features of the form might not be available, such as checking conditions and correctly filtered parameter lists (in the parameter selection helper window).