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 }
{/if}
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 }
{/if}
manual: http://www.smarty.net/manual/en/language.function.if.php
Down in the examples you can see the following:
{if isset($name) && $name == 'Blog'}
{* do something *}
{elseif $name == $foo}
{* do something *}
{/if}
From that code I deduct that you need to to this:
{if !isset($variable)}
{/if}
PS: I have never used Smarty, need to learn new syntax for what you can do with PHP
edit
Reason why Smarty is too bulky http://www.sitepoint.com/article/beyond-template-engine/
(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.