轻源码

  • QingYuanMa.com
  • 全球最大的互联网技术和资源下载平台
搜索
一起源码网 门户 织梦CMS 查看主题

织梦分页不完全显示页码方法

发布者: sdfsdfsd | 发布时间: 2018-8-17 09:37| 查看数: 4272| 评论数: 1|帖子模式

[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

322061d09893758fa5367282fafb44ac.jpg (9.23 KB, 下载次数: 45)

322061d09893758fa5367282fafb44ac.jpg

最新评论

        发表于 2022-7-9 15:50
代码是怎么写出来的

轻源码让程序更轻更快

QingYuanMa.com

工作时间 周一至周六 8:00-17:30

侵权处理

客服QQ点击咨询

关注抖音号

定期抽VIP

Copyright © 2016-2021 https://www.171739.xyz/ 滇ICP备13200218号

快速回复 返回顶部 返回列表