$endIf

is used to end the whole $if block

Usage

$if[EXPRESSION]
CODE BLOCK
$endIf