December 2012
Intermediate to advanced
488 pages
10h 23m
English
In this section, we'll take a look at the conditional and looping statements that are available at compile time.
The if statement checks whether a preprocessor variable is set to a certain value. If it is, the markup between the opening if statement and the closing endif will be compiled. Optionally, it can be followed by an elseif or else statement, allowing you to compile other code if the initial condition is false. The entire block must end with endif. The following snippet is an example that only compiles a Property element if the preprocessor variable myVar is equal to 10:
<?if $(var.myVar) = 10 ?> <Property Id="newProperty" Value="5" /> <?endif?>
Here's a more complex example that utilizes ...
Read now
Unlock full access