by Glenn Richmond, on May 30, 2016

One of the nice features available within Flexidocs is the ability to have conditional sections within your documents. This is somewhat more advanced and it’ll be important to ensure that you get the syntax right within your document.

The syntax of a conditional statement is as follows: 


{if $mybooleanvariable}
This is printed when the condition is true
{else}
This is printed when the condition is false
{/if}

This allows you to include or exclude sections based on conditional variables, which can be integers or check- box variables. 

Combining Multiple Conditions

If you need to combine multiple conditions into a single statement, use the or or and operators as shown below. 


{if ($mystring eq "teststring") and ($stringtwo eq "anotherstring")}
This is printed when the condition is true
{else}
This is printed when the condition is false
{/if}