freemarker获取list索引值

freemarker中遍历list获取索引值

<#list currentPathList as path>
    <#if path_index == 0)>
    </#if>	
</#list>
as 后面的那个变量,加上_index,就可以表示当前循环到第几项

猜你喜欢

转载自blog.csdn.net/sayoko06/article/details/80980337