Conditions

The instructions for the wizard can add conditions to any element in a section. A condition can be used to change the output HTML page depending on the context by showing or hiding certain configuration options depending on the previous settings.

Conditions always refer to the previous element. They consist of a class specifier and one or more condition patterns. A pattern consists of two operands and one operator. The following applies here:

A class can contain any number of condition patterns and an element can contain any number of conditions. For example, the following conditions only display the section if the internal variable wizard.test_select1 is equal to 1, and wizard.test_select4 or wizard.test_select5 is equal to 0:

section
only_if wizard.test_select1, "1", equal
only_if wizard.test_select4, "0", equal, wizard.test_select5, "0", equal

Classes

The instructions can include the following classes:
  • only-if: The preceding element is only executed or displayed when at least one of the following condition patterns is fulfilled.
  • skip-if: The preceding element is not executed or displayed when all of the following condition patterns are fulfilled.

Operands

The condition pattern can contain the following operands:
  • Static text
  • Internal variables of the wizard
  • Variables for referencing values from the current configuration of the device (configuration variables)
  • The character '*' as a wildcard

Operators

The condition pattern can contain the following operators:
  • equal: Checks if the two operands are equal.
  • exists: Checks if the specified configuration variable is set, i.e. that the value of the parameter in the configuration is not empty.
  • empty: Checks if the first operand is empty. The second operand is specified as a wildcard '*'.
  • contains: Checks if the first operand contains the second operand.
  • !: Negates the condition.

Examples

The following condition only displays the section if the internal variable 'wizard.test_select' is equal to '0'.

section
only_if wizard.test_select, "0", equal

The following condition sets the internal variable 'wizard.intranet_name' to the value 'INTRANET' if this variable is empty.

set wizard.intranet_name, "INTRANET" only_if wizard.intranet_name, *, empty

The following condition sets the internal variable 'wizard.target_1' to the value 'TARGET_1' if the internal variable 'wizard.select_target' is set either to '1' or '5'.

set wizard.target_1, "TARGET_1" only_if wizard.select_target, "1", equal, wizard.select_target, "5", equal

www.lancom-systems.com

LANCOM Systems GmbH | A Rohde & Schwarz Company | Adenauerstr. 20/B2 | 52146 Wuerselen | Germany | E‑Mail info@lancom.de

LANCOM Logo