Answers for "if else in smarty"

PHP
0

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}
Posted by: Guest on October-08-2020
0

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}
Posted by: Guest on October-26-2020

Browse Popular Code Answers by Language