smarty if or code example
Example 1: smarty if
{if isset($name) && $name == 'Blog'}
{* do something *}
{elseif $name == $foo}
{* do something *}
{/if}
{if is_array($foo) && count($foo) > 0}
{* do a foreach loop *}
{/if}
Example 2: if condition in smarty
{if $userroleid eq 12 || $userroleid eq 13 || $userroleid eq 14 }
<a href="{$v.feature_url}" class="re-upload"> View</a>
{else}
<a href="{$v.feature_url}" class="re-upload"> Re-upload</a>
{/if}