[size=13.3333px]DedeCMS文章内容页分页太多,内容分页页码会全部显示在网页里,非常不美观,很多站长都遇到过这样的情况,如下图所示:
[size=13.3333px]
<p style="margin: 10px auto; padding: 0px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13.3333px; line-height: 24px;">这样不美观,那么我们可以让页面只能显示,每页只固定显示当前页的前后几个,就用到下面的方法了。
打开include/arc.archives.class.php文件
找到代码:
for($i=1;$i= $total_list) {$i = $nowPage-4; //显示4页
$total_list = $nowPage+4; //显示4页
if($total_list >= $totalPage) $total_list = $totalPage;
}
else
{
$i=1;
if($total_list >= $totalPage) $total_list = $totalPage;
}
<div class="line number12 index11 alt1" style="margin: 0px !important; padding: 0px 1em !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.8em !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; min-height: auto !important; white-space: nowrap !important; background-image: none !important; background-attachment: initial !important; background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">for($i;$i |
|