主题 : 分页问题 |
级别: 贡士
![]() |
1# 发表于:2016-12-09 11:16:37 IP:140.225.*.*
|
||||
---|---|---|---|---|---|
级别: 贡士
![]() |
3# 发表于:2016-12-09 11:42:04 IP:140.225.*.*
那这怎么修改一下,不能只显示3页啊,点击到3的时候后面的页面数都出不来,怎么知道后面还有没有页数呢
|
||
---|---|---|---|
级别: 贡士
![]() |
5# 发表于:2016-12-09 11:45:53 IP:140.225.*.*
我不是该样式 ,页面里哪个是判断页数的?点击第三条的时候把后面的页数也显示出来
|
||
---|---|---|---|
级别: 贡士
![]() |
7# 发表于:2016-12-09 11:52:47 IP:140.225.*.*
<div class="page-large">
[#assign p=tag_pagination/] <div style="display:inline-block;"> [#if p.firstPage] [#else]<a href="#" class="prev-page" onclick="location.href=encodeURI('${hrefFormer}[#if p.prePage gt 1]_${p.prePage}[/#if]${hrefLatter}');"></a> [/#if] [#if p.pageNo lte 3] [#if p.totalPage gt 3] [#list 1..3 as i] [#if i==1] <a [#if i==p.pageNo]class="Num on"[#else]class="Num"[/#if] href="#" onclick="location.href=encodeURI('${hrefFormer}${hrefLatter}');">${i}</a> [#else] <a [#if i==p.pageNo]class="Num on"[#else]class="Num"[/#if] href="#" onclick="location.href=encodeURI('${hrefFormer}_${i}${hrefLatter}');">${i}</a> [/#if] [/#list] [#else] [#list 1..p.totalPage as i] [#if i==1] <a [#if i==p.pageNo]class="Num on"[#else]class="Num"[/#if] href="#" onclick="location.href=encodeURI('${hrefFormer}${hrefLatter}');">${i}</a> [#else] <a [#if i==p.pageNo]class="Num on"[#else]class="Num"[/#if] href="#" onclick="location.href=encodeURI('${hrefFormer}_${i}${hrefLatter}');">${i}</a> [/#if] [/#list] [/#if] [#else] [#assign first=p.pageNo-2/] [#assign last=p.pageNo/] <a class="Num" href="#" onclick="location.href=encodeURI('${hrefFormer}${hrefLatter}');">1</a> [#if first gt 2]<a class="Num none">...</a>[/#if] [#list first..last as i] <a [#if i==p.pageNo]class="Num on"[#else]class="Num"[/#if] href="#" onclick="location.href=encodeURI('${hrefFormer}_${i}${hrefLatter}');">${i}</a> [/#list] [#if p.totalPage!=p.pageNo] [#if last lt p.totalPage-1]<a class="none">...</a>[/#if] <a class="Num " href="#" onclick="location.href=encodeURI('${hrefFormer}_${p.totalPage}${hrefLatter}');">${p.totalPage}</a> [/#if] [/#if] [#if p.lastPage] [#else] <a class="next-page" href="#" onclick="location.href=encodeURI('${hrefFormer}_${p.nextPage}${hrefLatter}');"></a> [/#if] </div> </div>哪个是判断第三条展开的? |
||
---|---|---|---|
级别: 版主
![]() |
8# 发表于:2016-12-09 11:54:52 IP:117.152.*.*
[#if p.pageNo lte 3]
[#if p.totalPage gt 3] [#list 1..3 as i] [#if i==1] <a [#if i==p.pageNo]class="Num on"[#else]class="Num"[/#if] href="#" onclick="location.href=encodeURI('${hrefFormer}${hrefLatter}');">${i}</a> [#else] <a [#if i==p.pageNo]class="Num on"[#else]class="Num"[/#if] href="#" onclick="location.href=encodeURI('${hrefFormer}_${i}${hrefLatter}');">${i}</a> [/#if] [/#list] [#else] [#list 1..p.totalPage as i] [#if i==1] <a [#if i==p.pageNo]class="Num on"[#else]class="Num"[/#if] href="#" onclick="location.href=encodeURI('${hrefFormer}${hrefLatter}');">${i}</a> [#else] <a [#if i==p.pageNo]class="Num on"[#else]class="Num"[/#if] href="#" onclick="location.href=encodeURI('${hrefFormer}_${i}${hrefLatter}');">${i}</a> [/#if] [/#list] [/#if] |
||
---|---|---|---|