Advertisement

{if},{elseif},{else}

{if} statements in Smarty have much the same flexibility as PHP
if
statements, with a few added features for the template engine.
Every {if} must be paired with a matching
{/if}. {else} and
{elseif} are also permitted. All PHP conditionals
and functions
are recognized, such as ||, or,
&&, and,
is_array(), etc.

If securty is enabled, only PHP functions from $php_functions property of the securty policy are allowed.
See the Security section for details.

The following is a list of recognized qualifiers, which must be
separated from surrounding elements by spaces. Note that items listed
in [brackets] are optional. PHP equivalents are shown where applicable.