<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--{if $helps}-->
<!-- {foreach from=$helps item=help_cat} -->
<dl>
<dt><a href='{$help_cat.cat_id}' title="{$help_cat.cat_name}">{$help_cat.cat_name}</a></dt>
<!-- {foreach from=$help_cat.article item=item <span style="color: #ff0000;">name=articles_foreach</span>} -->
<span style="color: #ff0000;"><!-- {if $smarty.foreach.articles_foreach.index <= 5}-->
</span> <dd><a href="{$item.url}" title="{$item.title|escape:html}">{$item.short_title}</a></dd>
<span style="color: #ff0000;"><!--{/if}-->
</span> <!-- {/foreach} -->
</dl>
<!-- {/foreach} -->
<!--{/if}-->
其中
<!-- {if $smarty.foreach.articles_foreach.index <= 5} <!--{/if}-->
就是指定条数的语句