6.4. Conditional Text
Blocks of text can be conditionally included or excluded using the following macros:
!if condition !elsif condition !else !endif
These macros allow you to tune the output for different audiences. For example, you may wish to only include email directions if HTML is being generated:
!if OPT_PP_HTML Click {{[jump="mailto:joe"] here}} to send me email. !endif
Note:
- elseif can be used instead of elsif if you prefer.
- condition is an SDF expression where unknown variables do not give errors
- Conditional text blocks must be fully defined within a given file. This prevents an if macro within an included file excluding text in the file doing the including.