else

1.0 1.1 1.2 1.3

Generic else block, it supports all builtin optional-display blocks which are if, loop, for, foreach and with.

If any of those block contains an else statement, the content between {else} and {/*blockname*} (you do not need to close the else block) will be shown if the block’s condition has no been met

Examples

Example #1

index.tpl
{foreach $array val}
    $array is not empty so we display it's values : {$val}
{else}
    if this shows, it means that $array is empty or doesn't exist.
{/foreach}