织梦文章内容分页页数控制方法

织梦文章内容分页页数控制方法很简单,到include/arc_archives.class.php文件中,

查找 for($i=1;$i<=$totalPage;$i++)

替换为:

$total_list=7; //显示7个,3*2+1=7 if($nowPage >= $total_list) { $i = $nowPage-3; //前后6个,(7-1)/ 2=3 $total_list = $nowPage+3; //前后3个,(7-1)/ 2=3 if($total_list >= $totalPage) $total_list = $totalPage; }else{ $i=1; if($total_list >= $totalPage) $total_list = $totalPage; } for($i;$i<=$total_list;$i++)  

 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/db3cd486823209f083c6fe85909fa785.html