### 分页模板函数,三个参数含义分别为:当前页、总页数,分页前方的链接
### 具体用法在 jfinal-club 中有很多
#define adminPaginate(currentPage, totalPage, link)
#if(totalPage < 2 || currentPage > totalPage)
#end
#setLocal(startPage = currentPage - 3)
#if(startPage < 1)
#setLocal(startPage = 1)
#end
#setLocal(endPage = currentPage + 3)
#if(endPage > totalPage)
#setLocal(endPage = totalPage)
#end
#if(endPage == 0)
#setLocal(endPage = 1)
#end
- 显示条数:
-
- 首页
#if(currentPage > 1)
- 上一页
#end
#if(currentPage - 3 > 1)
- 1
#end
#for(i : [startPage..endPage])
#if(currentPage == i)
- #(i)
#else
- #(i)
#end
#end
#if(currentPage + 3 < totalPage)
- #(totalPage)
#end
#if(currentPage < totalPage)
- 下一页
#end
- 未页
#end