[Index]
Model: data/StaticVariable
Custom Variables
System administrators can create custom macros for use in for example
custom Configuration Templates.
Note
- The macro needs to be evaluated at the hierarchy that it is created.
- The same macro variable can be defined to have different values at different hierarchies.
- Choose Advanced Tools > Custom Variables and click Add.
- Enter the macro name, optional description and value. The name must be prefixed with CV_.
For details on macro syntax, refer to the "Advanced Configuration Guide".
- Click Save.
To test the macro, enter it in the macro evaluator at Administration Tools > Macro Evaluator.
Example
Create:
CV_current_time
Current time is: {{ fn.now }}
Invoke:
{{ macro.CV_current_time }}
Output example:
Current time is: 2017-03-31 13:20:18.509871
Data model to manage static variables.
Model Details
- An asterisk * in the title indicates the field is mandatory.
- If a field has a default value, it is shown in the Description column.
- If the field type is an array, the Field Name has a .[n] suffix, where n is the array index placeholder.
- Object and array field names are listed to provide context. If a field belongs to an object or an array,
the full field name is shown in dot separated notation.
Custom Variable Name *
|
The name of the static variable. The variable name must be prefixed by CV_.
|
- Field Name:
name
- Type: String
- Pattern: ^CV_[a-zA-Z0-9_-]+$
|
Description
|
A useful description of the defined static variable.
|
- Field Name:
description
- Type: String
|
Value *
|
Enter a value to be assigned to the static variable name.
|
- Field Name:
value
- Type: String
|