在最后一种选择中增加一个班子,从原样子,出于某种原因重复这个班子?
{if $subcategories}
<div class="subcategories">
{if $subcategories|@count < 6}
<ul>
{/if}
{foreach from=$splitted_subcategories item="ssubcateg"}
{if $subcategories|count >= 6}
<div class="subcategories">
<ul>
{/if}
{foreach from=$ssubcateg item=category name="ssubcateg"}
{if $category.category_id}<li{if $smarty.foreach.ssubcateg.last} class="last"{/if}><a href="{"categories.view?category_id=`$category.category_id`"|fn_url}" class="strong">{$category.category}</a></li>{/if}
{/foreach}
{if $subcategories|count >= 6}
</ul>
</div>
{/if}
{/foreach}
{if $subcategories|count < 6}
</ul>
{/if}
</div>
{/if}
output: seems to be repeating? and if there are 6 results is adds one class="last" but the middle result as in 3rd result?
<ul>
<li class="last"><a class="strong" href="#">Link</a></li>
<li><a class="strong" href="#">Link</a></li>
<li class="last"><a class="strong" href="#">Link</a></li>
<li><a class="strong" href="#">Link</a></li>
</ul>