$WBIF - conditionally execute statements

Availability
$WBIF is available for use with all WBSP commands.

Syntax
$WBIF{expression|true part|false part}
$WBIF[expression|true part|false part]

Parameters
expression -  expression you want to evaluate. If it contains more conditions connected with keyword AND or keyword OR, single condition has to be enclosed in brackets - (condition 1) or (condition 2)
true part - value that will be returned if expression is True
false part - value that will be returned if expression is False

Returns
Code contained in true part or false part depending on result of evaluated expression.

Example

[FormFields]
WB_basename=biblio.mdb
wb_rcdset=titles
wb_command=Q
wb_maxrec=5
-->
<!--WB_BeginTemplate-->
<html>
<head>
<title>Titles</title>
</head>
<body>
<table border="1" cellspacing="0">
<tr>
<td>Year published</td>
<td>Title</td>
<td>ISBN</td>
</tr>
<!--WB_BeginDetail-->
<tr bgcolor="#$wbif[$wbcalc[$wbp[rn]/2]=$wbcalc[$wbp[rn]\2]|c0c0c0|ff6699]">
<td>$wbf[Year published]</td>
<td>$wbf[title]</td>
<td>$wbf[ISBN]</td>
</tr>
<!--WB_EndDetail-->
</table>
</body>
</html> 

After running this example, the resulting page in browser, may look like this:

Year published Title ISBN
2001 McGraw-Hill's Encyclopedia of Networking & Telecommunications 0072120053
2000 Microsoft SMS Installer 0072124474
2001 Windows 2000 Iis 5.0 : A Beginner's Guide 0072133724
1996 Windows Nt Security Handbook 0078822408
1998 Microsoft Internet Information Server 4: the Complete Reference 0078824575