(no commit message)
[openafs-wiki.git] / TWiki / VarIF.mdwn
1 <a name="VarIF"></a>
2
3 ### <a name="IF{&quot;condition&quot; ...} -- simple co"></a> IF\{"condition" ...\} -- simple conditionals
4
5 - Evaluate a condition and show one text or another based on the result. See details in [[IfStatements]]
6 - Syntax: `%IF{"CONDITION" then="THEN" else="ELSE"}%` shows `"THEN"` if `"CONDITION"` evaluates to `TRUE`, otherwise `"ELSE"` will be shown
7 - Example: `%IF{"defined FUNFACTOR" then="FUNFACTOR is defined" else="FUNFACTOR is not defined"}%` renders as `FUNFACTOR is not defined`
8 - Related: [[$IF()|Main/SpreadSheetPlugin#FuncIF]] of [[SpreadSheetPlugin]]