{$quantity = [[1, 4, 7 ,9], [2, 5, 8 ,10], [3, 6, 11]]} {$quantityCount = count($quantity) - 1} {$class = [ 1 => 'line-first column-first large', 4 => 'line-first large', 7 => 'line-first regular', 9 => 'line-first column-last small', 2 => 'column-first large', 5 => 'large', 8 => 'regular', 10 => 'column-last small', 3 => 'line-last column-first large', 6 => 'line-last large', 11 => 'line-last regular' ]} {for $i = 0 to $quantityCount} {for $j = 0 to count($quantity[$i]) - 1} {$type = $quantity[$i][$j]} {if $type == 11 && $villagePresentUnits.unitsArray[$type].amount == 0} {continue} {/if} {/for} {/for}
{if $type <= 10}{$villagePresentUnits.unitsArray[$type].name}{else}{$smarty.const.U0}{/if} 0}value="{$units[$type]}"{/if}> {if $villagePresentUnits.unitsArray[$type].amount > 0} ({$villagePresentUnits.unitsArray[$type].amount}) {else} (0) {/if}