Static Vars

Added in V1

Static vars are pieces of a sample that can be replaced with a string while injecting them

Syntax

In the sample include ${} with the var name

<sample>
  <p>Static var example: ${Var}</p>
</sample>

And on the html include a var attribute

<element var="Var:Value"></element>

Each static var must follow the Key:Value syntax

This is the resulting html using inject:

<element var="Var:Value">
  <p>Static var example: Value</p>
</element>

For multiple static vars separate each static var with ;

<element var="Var1:Value1;Var2:Value2"></element>

Updating vars

If changed via js, the Update function needs to be called to update the contents, using replace will remove the static var values so it can't be updated.

Last updated