I have global function defined in php:
function tabIsProtected($tabNr)
{
...
return true;
}
Now this works in Smarty:
{if tabIsProtected($tabnr)}
{assign var="tabProtected" value=true}
{else}
{assign var="tabProtected" value=false}
{/if}
And this is not:
{assign var="tabProtected" value=tabIsProtected($tabnr)}
When I print $tabProtected variable I get string "tabIsProtected(9)" (for $tabnr = 9) and function tabIsProtected isn't even called!
Is there any way to assign function return value directly in template using Smarty 2?
IMPORTANT: I don't want $smarty->assign(...) in php or Smarty3 solutions. Just one liner directly in template.