该栏目分享织梦建站的基础知识,从织梦CMS的安装,到织梦标签的常规调用,以及织梦的常见问题答疑都有涉及。
今天为了美化一下网站的分页样式,折腾了将近1小时,现将结果分享出来,以备日后之需。
1、首先回顾一下织梦的 pagelist标签;
名称:pagelist
功能:表示分页页码列表
语法:
{dede:pagelist listsize='3' listitem=''/}
文件:
\include\arc.listview.class.php
\include\arc.sglistview.class.php
function GetPageListDM($list_len,$listitem="index,end,pre,next,pageno")
function GetPageListST($list_len,$listitem="index,end,pre,next,pageno")
参数:
listsize=3 表示 [1][2][3] 这些项的长度 x 2
listitem='index,pre,pageno,next,end,option' 表示页码样式,可以把下面的值叠加
index 首页
pre 上一页
pageno 页码
next 下一页
end 末页
option 下拉跳转框
2、然后根据生成的文章列表的html代码查看html标签,而后调整CSS样式,从而得到符合自己的分页样式;
在这一步时我估计是走了弯路, 上述的二个php文件(arc.listview.class.php;arc.sglistview.class.php)我以前好像修改过,此次重新修改了这2个文件,附上下载地址(覆盖原有的文件);
1)列表页模板内调用: (大家参考上述的说明,根据自己需要调整)
{dede:pagelist listitem="info,index,end,pre,next,pageno"listsize="3"/}2)然后就是CSS样式表了; 如下:
.lmlpage{ margin:10px 0px;
text-align:left;
padding:10px 0;
}
.page-numbers li{
float:left;
margin:0 15px 0 0;
}
.page-numbers a,span.page-numbers{
display:block;
padding:8px 0px;
min-width:50px;
border-radius:2px;
background:#3f484f;
color:#fff;
text-align:center;
font-weight:bold;
}
.page-numbers a:hover,.page-numbers span.current{
background:#f36119;
}
.thisclass a{background:#f36119;
}
.page-numbers a:hover,.page-numbers span.current{
background:#f36119; color:#FFF
}
.pageinfo{display:block;
padding:8px 0px;
min-width:110px;
border-radius:2px;
background:#3f484f;
color:#fff;
text-align:center;
font-weight:bold;}分享到此就结束了,看看我的成果:

本文标签:
版权说明:如非注明,本站文章均为 dede模板_织梦网站模板_网站源码下载_模板精 原创,转载请注明出处和附带本文链接。
上一篇
下一篇
售价:0 ℃ 评论
售价:0 ℃ 评论
售价:0 ℃ 评论
售价:0 ℃ 评论
售价:0 ℃ 评论
售价:0 ℃ 评论