if condition in smarty

Solutions on MaxInterview for if condition in smarty by the best coders in the world

showing results for - "if condition in smarty"
Harley
27 Jan 2017
1{if isset($name) && $name == 'Blog'}
2     {* do something *}
3{elseif $name == $foo}
4    {* do something *}
5{/if}
6
7{if is_array($foo) && count($foo) > 0}
8    {* do a foreach loop *}
9{/if}
Cristina
08 Sep 2019
1{if $userroleid eq 12 || $userroleid eq 13 || $userroleid eq 14 }
2    <a href="{$v.feature_url}" class="re-upload"> View</a>
3{else}
4    <a href="{$v.feature_url}" class="re-upload"> Re-upload</a>
5{/if}
6