修改DedeCMS pagebreak标签 不列出全部页

织梦技巧评论399 views阅读模式

需求:我的图片集有几百张,幻灯显示会把所有的都列出来,影响美观,如图:         效果:     修改后达到这个效果,只列前后6张,共13个链接,如图:         方法:     修改 include\inc_archives_view.php 文件:     1、查找“function GetPagebreakDM($totalPage,$nowPage,$aid)”(动态页面分页函数,大概在510行左右 )     A、往下几行找到“for($i=1;$i<=$totalPage;$i++)”,在上面插入   Copy to ClipboardLiehuo.Net Codes引用的内容:[www.veryhuo.com] $total_list=13; //显示13个,6*2+1=13  if($nowPage >= $total_list) {  $i = $nowPage-6; //前后6个,(13-1)/ 2=6  $total_list = $nowPage+6; //前后6个,(13-1)/ 2=6  if($total_list >= $totalPage) $total_list = $totalPage;  }else{  $i=1;  if($total_list >= $totalPage) $total_list = $totalPage;  } B、把“for($i=1;$i<=$totalPage;$i++)”,改成“for($i;$i<=$totalPage;$i++)”    2、查找“function GetPagebreak($totalPage,$nowPage,$aid)”(静态页面分页函数函数,大概在550行左右)  A、同上  B、同上   附件下载:091110114422.rar   相关文章:DedeCMS分页太多 页码智能显示的方法

企鹅博客
  • 本文由 发表于 2019年9月20日 17:04:38
  • 转载请务必保留本文链接:https://www.qieseo.com/36284.html

发表评论