Basics of Conditional SSI
This guide introduces the very basics of conditional SSI with some simple examples.
Conditional SSI "Flow Control" allows you to test for certain variables and display content depending on what those variables are. To better explain it consider the following scenario:
If your browser is Netscape:
The correct syntax takes this basic format:
<!--#if expr="expression" -->
To show this in a working example we are going to display a simple message depending on what day of the week it is.
First we configure the time format for the full weekday name, then we check what day of the week it is and attach the appropriate message:
<!--#config timefmt="%A" -->
Conditional SSI is where it gets exciting as it allows you to add a great deal of dynamism and personalisation to your pages and so is important to learn and experiment with. More examples & applications are accessible through the main SSI page.
It's also important to check out the conditional expressions page to learn what 'operators' can be used with conditional SSI.