$$Include{docs/siteMacros.textCarver}

# Conditionals
Want to include a chunk of text in some cases but not others? Conditionals are here to help.

$$example{}
\$\$IfAlways{}
Hello
\$\$EndIf{}<br>
\$\$IfNever{}
Goodbye
\$\$EndIf{}

$$exampleRight{}
Hello

$$endExample{}


### Conditional syntax
Textcarver supports the following types of conditionals:

$$exampleSimple{}
\$\$IfConditional{}
\$\$IfNotConditional{}
<br>

\$\$ElseIfConditional{}
\$\$ElseIfNotConditional{}
<br>

\$\$EndIf{}

$$endExample{}


### Supported conditionals
The full list of supported conditionals is:

$$exampleSimple{}
\$\$IfAlways{}
\$\$IfNever{}
\$\$IfNumArgs{3}
\$\$IfEmpty{\$\$var{}}
\$\$IfEqual{\$\$var1{} | \$\$var2{}}
\$\$IfStartsWith{Hello | \$\$var{}}
\$\$IfEndsWith{.txt | \$\$var{}}
\$\$IfIncludes{Hello | \$}
\$\$IfIncludesRegex{\d{3} | g | \$\$var{}}
\$\$IfEven{\$\$var{}}
\$\$IfOdd{\$\$var{}}
\$\$IfExists{var}
\$\$IfFileExists{filePath}
\$\$IfJS{\$\$var1{} + \$\$var2{} > 10;}

$$endExample{}


[Next: Arguments](2cArguments.html)
