The simplest and shortest method to check a variable

If you are working with variables in smarty you know this procedure:

{if (isset($helloworld) && $helloworld != '')} 
    helloworld does not exist

But do you already know the default plugin? It works like a modifier.

The same stuff from above but much shorter:

{$helloworld|default:"helloworld does not exist"}

Or if you do not want to output an else statement:


This is also good to avoid internal Smarty warnings.