How to check if a variable is set in smarty template?

is there a function that I can use inside smarty template if any value is assigned to a template variable? something like:

{if $variable === null }



Down in the examples you can see the following:

{if isset($name) && $name == 'Blog'}
     {* do something *}
{elseif $name == $foo}
    {* do something *}

From that code I deduct that you need to to this:

{if !isset($variable)}


PS: I have never used Smarty, need to learn new syntax for what you can do with PHP :wink:
Reason why Smarty is too bulky
(if you are interested)

The code you provided worked. Thanks.

Actually, I know that you can also use native PHP templating instead of Smarty. It’s matter of taste and convinience. I find myself more productive with smarty.