Define a variable from another variable name, with a default value if undefined.

⚙️ Compatible targets: Linux


prefixThe prefix of the variable name.

This parameter is required.
nameThe variable to define, the full name will be

This parameter is required.
source_variableThe source variable name.

This parameter is required.
default_valueThe default value to use if source_variable is not defined.

This parameter is required.

Outcome conditions

You need to replace ${name} with its actual canonified value.

  • ✅ Ok: variable_string_default_${name}_ok
    • ☑️ Already compliant: variable_string_default_${name}_kept
    • 🟨 Repaired: variable_string_default_${name}_repaired
  • ❌ Error: variable_string_default_${name}_error


method: variable_string_default
  default_value: VALUE
  prefix: VALUE
  source_variable: VALUE
  name: VALUE


To use the generated variable, you must use the form ${} with each name replaced with the parameters of this method.

Be careful that using a global variable can lead to unpredictable content in case of multiple definition, which is implicitly the case when a technique has more than one instance (directive). Please note that only global variables are available within templates.