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

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


 

这一讲,我们讲下列表页的分页代码,先找到如下代码:



  1. 1
  2. href="http://www.quanji.cn/news/1/index_2.html">2
  3. href="http://www.quanji.cn/news/1/index_3.html">3
  4. href="http://www.quanji.cn/news/1/index_4.html">4
  5. href="http://www.quanji.cn/news/1/index_5.html">5
  6. href="http://www.quanji.cn/news/1/index_6.html">6
  7. href="http://www.quanji.cn/news/1/index_7.html">7
  8. href="http://www.quanji.cn/news/1/index_8.html">8
  9. href="http://www.quanji.cn/news/1/index_9.html">9
  10. href="http://www.quanji.cn/news/1/index_10.html">10
  11. href="http://www.quanji.cn/news/1/index_11.html">11
  12. href="http://www.quanji.cn/news/1/index_12.html">12
  13. href="http://www.quanji.cn/news/1/index_2.html">下一页
  14. href="http://www.quanji.cn/news/1/index_35.html">尾页




修改为织梦的列表分页代码:

dedecms标签


  1. {dede:pagelist listitem="info,index,end,pre,next,pageno,option" listsize="5" /}








代码解释:

标签名称:pagelist

功能说明:表示分页页码列表

适用范围:仅列表模板 list_*.htm

基本语法:



  1. {dede:pagelist listsize='5' listitem=''/}



参数说明:

listsize 表示 [1][2][3] 这些项的长度 x 2

listitem 表示页码样式,可以把下面的值叠加

index 首页 pre 上一页 pageno 页码 next 下一页 end 末页 option 下拉跳转框

例:



  1. {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/}



查看前台:





看来页码是乱的,原因是织梦默认的列表页分页码自动生成

  • 标签,有两种解决办法,一种是在织梦分页码前后加
      标签,然后修改样式;一种是修改PHP文档,去掉
    • 标签。我们采用第二种,打开include目录下的文档arc.listview.class.php,将GetPageListST和GetPageListDM函数里的
    • 标签删除。修改后我们再次查看前台:







      显示正常,修改后的arc.listview.class.php下载
      DedeCMS漏洞文件之carbuyaction.php
    • 0
      点赞
    • 0
      收藏
      觉得还不错? 一键收藏
    • 0
      评论

    “相关推荐”对你有帮助么?

    • 非常没帮助
    • 没帮助
    • 一般
    • 有帮助
    • 非常有帮助
    提交
    评论
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

    当前余额3.43前往充值 >
    需支付:10.00
    成就一亿技术人!
    领取后你会自动成为博主和红包主的粉丝 规则
    hope_wisdom
    发出的红包
    实付
    使用余额支付
    点击重新获取
    扫码支付
    钱包余额 0

    抵扣说明:

    1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
    2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

    余额充值