`
piperzero
  • 浏览: 3456311 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

织梦(dedecms)仿站教程第二十三讲——列表页制作(二)

 
阅读更多
这一讲,我们讲下列表页的分页代码,先找到如下代码:
  1. <DIV class=pages><A title="Total record"> <B>865</B>
  2. </A> <B>1</B> <A
  3. href="http://www.quanji.cn/news/1/index_2.html">2</A> <A
  4. href="http://www.quanji.cn/news/1/index_3.html">3</A> <A
  5. href="http://www.quanji.cn/news/1/index_4.html">4</A> <A
  6. href="http://www.quanji.cn/news/1/index_5.html">5</A> <A
  7. href="http://www.quanji.cn/news/1/index_6.html">6</A> <A
  8. href="http://www.quanji.cn/news/1/index_7.html">7</A> <A
  9. href="http://www.quanji.cn/news/1/index_8.html">8</A> <A
  10. href="http://www.quanji.cn/news/1/index_9.html">9</A> <A
  11. href="http://www.quanji.cn/news/1/index_10.html">10</A> <A
  12. href="http://www.quanji.cn/news/1/index_11.html">11</A> <A
  13. href="http://www.quanji.cn/news/1/index_12.html">12</A> <A
  14. href="http://www.quanji.cn/news/1/index_2.html">下一页</A> <A
  15. href="http://www.quanji.cn/news/1/index_35.html">尾页</A></DIV>
修改为织梦的列表分页代码:
<DIV class=pages>
{dede:pagelist listitem="info,index,end,pre,next,pageno,option" listsize="5" /}
</DIV>
代码解释:
标签名称:pagelist
功能说明:表示分页页码列表
适用范围:仅列表模板 list_*.htm
基本语法:
{dede:pagelist listsize='5' listitem=''/}
参数说明:
listsize 表示 [1][2][3] 这些项的长度 x 2
listitem 表示页码样式,可以把下面的值叠加
index 首页 pre 上一页 pageno 页码 next 下一页 end 末页 option 下拉跳转框
例:
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/}
原文来自dedecms教程:http://www.software8.co/wzjs/dedecms/2779.html
查看前台:
看来页码是乱的,原因是织梦默认的列表页分页码自动生成<li></li>标签,有两种解决办法,一种是在织梦分页码前后加<ul></ul>标签,然后修改样式;一种是修改PHP文档,去掉<li></li>标签。我们采用第二种,打开include目录下的文档arc.listview.class.php,将GetPageListST和GetPageListDM函数里的<li></li>标签删除。修改后我们再次查看前台:
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics