HBcms是一个用Pear框架+Smarty模板引擎构架的cms项目,欢迎大家参与制作Smarty模板

rownum

rownum is used to display the current loop iteration, starting with one. It is an alias to iteration, they work identically.

rownum 用于显示循环的次数. 该属性是iteration的别名,两者等同.

Example 7-27. section property rownum
Smarty手册范例 7-27. section 的 rownum 属性演示

	{section name=customer loop=$custid}
	{$smarty.section.customer.rownum} id: {$custid[customer]}<br>
	{/section}


	输出结果:

	1 id: 1000<br>
	2 id: 1001<br>
	3 id: 1002<br>
这是一份简单的Smarty手册和Smarty教材,熟练掌握Smarty模板,让您做项目事半功倍