iteration 见 http://www.hbcms.com/main/smarty/foreach.property.iteration.html iteration 用于显示当前循环的执行次数[待考] iteration 总是从 1 开始,每执行一次增加 1.[待考] {foreach from=$dataRow item=row name=sample_dev} <tr id='tr{$row.category_id}'>
<td align="center">{$smarty.foreach.sample_dev.iteration}</td>
<td align="center" id='td{$row.category_id}'>{$row.category_name|escape:"html"}</td>
<td align="center" >
{if $row.wedding_id==0}
{$smarty.const.DISAPPROVE}
{else}
<a href="javascript:preUpdate({$row.category_id},'{$row.category_name}')">
<span id='span{$row.category_id}'>{$smarty.const.MMS_UPDATE}</span></a>
{if $row.counts<1}
<a href="javascript:preDelete({$row.category_id})">
<span id='spanDelete{$row.category_id}'>{$smarty.const.MMS_DELETE}</span></a>
{/if}
{/if}
</td>
</tr>
{/foreach}