Hy i have this code.
{if $isModerator && $order->kind==1}
bla bla
{/if}
and $order->kind can be 1,2,3,4,6 so making 5 if is not the idea any idea?
Hy i have this code.
{if $isModerator && $order->kind==1}
bla bla
{/if}
and $order->kind can be 1,2,3,4,6 so making 5 if is not the idea any idea?
Smarty has a for or while cycle? You could always cycle on that like in pseudocode here:
for($i=0;$i>max($order->kind);$i++){
if($isModerator and $order->kind==$i){
//code here
}
}
Wouldn't this work for you?
{if $isModerator && in_array($order->kind, array(1,2,3,4,5))}
bla bla
{/if}
Haven't used Smarty for quite a while now, so not sure.