IF
The agent interface's HCHL pages can now also contain conditional sections through the integration of the IF tag. The IF tag consists in effect of four different tags – IF, ELSEIF, ELSE and ENDIF – used exactly the same way as the Chilli IF language statement. The IF tags can be nested to any level. For more information about the IF tag, see the Chilli Reference Manual.
Start Tag | required |
End Tag | required |
Syntax | <IF condition=(Chilli expression)><ELSEIF condition=(Chilli expression)> <ELSE> <ENDIF> |
Mandatory Parameters
a value which is evaluated as an expression and determines if the statement following the condition is executed or not. |
Optional Additional Parameters
There are no optional parameters for this tag.
condition
The condition parameter is a value which is always evaluated as an expression:
Example
<IF condition=(BROWSER_TYPE="Mozilla/3.6.13 [en] (X11; U; Linux 2.2.5-15 i568), Mozilla Firefox")>
<p>Your browser is Mozilla Firefox version 3.6.13.
<ELSEIF condition=(BROWSER_TYPE="Mozilla/5.0 (compatible; MSIE 5; Windows 2000), Microsoft Internet Explorer")>
<p>Your browser is Microsoft Internet Explorer version 8
<ELSE>
<p>Your browser is not certified for use with the BCM Agent Interface v 10.1.
<ENDIF>
<p>Your browser is Mozilla Firefox version 3.6.13.
<ELSEIF condition=(BROWSER_TYPE="Mozilla/5.0 (compatible; MSIE 5; Windows 2000), Microsoft Internet Explorer")>
<p>Your browser is Microsoft Internet Explorer version 8
<ELSE>
<p>Your browser is not certified for use with the BCM Agent Interface v 10.1.
<ENDIF>
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*