ifdef/elsedef tag does the processing in accordance with whether a PHP variable is defined.
{{ @ifdef val_name }}
statements
{{ @elsedef }}
statements
{{ @endifdef }}
$assign['sample_ifdef1'] = 'foo';
$assign['sample_ifdef2'] = 'bar';
unset($assign['sample_ifdef2']);
{{ @ifdef sample_ifdef1 }}
defined : {{ sample_ifdef1 }}
{{ @elsedef }}
undefined
{{ @endifdef }}
<br>
{{ @ifdef sample_ifdef2 }}
defined : {{ sample_ifdef2 }}
{{ @elsedef }}
undefined
{{ @endifdef }}
defined : foo
undefined