分页例子
div id="${modId}"><ul><#list ws.data as list><li><a href="${list.url}">${list.title}</a></li></#list></ul><div class="conPage"><#if ws.getHasPreviousPage()=='true'><a class='pageNum' href='${ws.firstPage}'>首页</a><a class='pageNum' href='${ws.previousPage}'>前一页</a> <#else></#if><#if ws.getHasNextPage()=='true'><a class='pageNum' href='${ws.nextPage}'>后一页</a><a class='pageNum' href='${ws.lastPage}'>末页</a> <#else></#if><select name='sltpage' style='font-size:10px;font-family:arial'onchange=window.open('${ws.onchangeUrl}'+(this.value-1),'_self')><#list 1..ws.totalPage as x><#if ws.currentPage==x_index><option value='${x_index+1}' selected><#else><option value='${x_index+1}'></#if>${x_index+1}</option></#list></select><span style='font:10px arial;color:#333333;'> / ${ws.totalPage}</span> 第${ws.currentPage+1}页 共${ws.totalPage}页</div></div>注意:
1 ${ws.totalPage} int类型也可以正常显示
2 <#if ws.getHasPreviousPage()=='true'> ws.getHasPreviousPage()为直接调用JAVA中的函数 不清楚是不是 只支持get
3 x_index+1循环的序列 其中 x为序列的别名