织梦(dedecms)仿站教程第二十三讲——列表页制作(二)
这一讲,我们讲下列表页的分页代码,先找到如下代码:
- <DIV class=pages><A title="Total record"> <B>865</B>
- </A> <B>1</B> <A
- href="http://www.quanji.cn/news/1/index_2.html">2</A> <A
- href="http://www.quanji.cn/news/1/index_3.html">3</A> <A
- href="http://www.quanji.cn/news/1/index_4.html">4</A> <A
- href="http://www.quanji.cn/news/1/index_5.html">5</A> <A
- href="http://www.quanji.cn/news/1/index_6.html">6</A> <A
- href="http://www.quanji.cn/news/1/index_7.html">7</A> <A
- href="http://www.quanji.cn/news/1/index_8.html">8</A> <A
- href="http://www.quanji.cn/news/1/index_9.html">9</A> <A
- href="http://www.quanji.cn/news/1/index_10.html">10</A> <A
- href="http://www.quanji.cn/news/1/index_11.html">11</A> <A
- href="http://www.quanji.cn/news/1/index_12.html">12</A> <A
- href="http://www.quanji.cn/news/1/index_2.html">下一页</A> <A
- href="http://www.quanji.cn/news/1/index_35.html">尾页</A></DIV>
看来页码是乱的,原因是织梦默认的列表页分页码自动生成<li></li>标签,有两种解决办法,一种是在织梦分页码前后加<ul></ul>标签,然后修改样式;一种是修改PHP文档,去掉<li></li>标签。我们采用第二种,打开include目录下的文档arc.listview.class.php,将GetPageListST和GetPageListDM函数里的<li></li>标签删除。修改后我们再次查看前台: