University Technology, [U]Tech

Conditional Statements

Conditions include variable comparisons and existence.

Comparisons are:

  • = - Equals: The two sides are exactly the same.
  • <> - Not Equal: The two sides are not the same.
  • ~ - Contains: The right side is a substring of the left side.

Syntactical elements for conditions are [IF xxx], [ELSE], [ELSIF xxx] and [ENDIF].

Examples:

[IF user->lang=fr]
Bienvenue dans la liste [list->name]
[ELSIF user->lang=es]
Bienvenida en la lista [list->name]
[ELSE]
Welcome to the list [list->name]
[ENDIF]

[IF is_owner]
The following commands are available only for lists owners or moderators:
....
[ENDIF]

[IF user->email ~ case.edu]
Text for Case users only.
[ELSE]
Text for off campus users.
[ENDIF]
© 2016 Case Western Reserve University
Cleveland, OH 44106
216.368.2000
 
University Technology
(legal notice) (privacy statement)
 
Contact website owner
 
Contact our service desk
CWRU UTech Social Networks
Translate this page