if condition in smarty

54

{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}
{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}

Comments

Submit
0 Comments