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

total

total is used to display the number of iterations that this section will loop. This can be used inside or after the section.

total 用于显示循环执行总的次数. 可以在循环中或执行结束后调用此属性.

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

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

	There were {$smarty.section.customer.total} customers shown above.

	输出结果:

	0 id: 1000<br>
	2 id: 1001<br>
	4 id: 1002<br>

	There were 3 customers shown above.
这是一份简单的Smarty手册和Smarty教材,熟练掌握Smarty模板,让您做项目事半功倍