百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>织梦CMS教程> 织梦(dedecms)怎么自由的在列表页输出当前分页
分享文章到:

织梦(dedecms)怎么自由的在列表页输出当前分页

发布时间:12/03 来源: 浏览: 关键词:
织梦(dedecms)怎么自由的在列表页输出当前分页?大家好,欢迎来到俊尚仿站网!对于织梦列表页面的分页可谓是折煞众人啊,目前好多人通过俊尚仿站网的客户来咨询织梦织梦(dedecms)怎么自由的在列表页输出当前分页的问题;而网上大多解决的都是是列表页面调用分页方法,可怎么做到“自由”呢?今天就由魔酷阁来给大家说说织梦(dedecms)怎么自由的在列表页输出当前分页?

        好了,我们言归正传!要想让织梦文章页面自由的调用列表分页面只用传统的分页代码是做不到的,那只有进后台修改配置文件,这样才会解决,看操作代码步骤:
        第一步:打开/include/arc.listview.class.php 文件,找到:

        if(preg_match('/index/i', $listitem)) $plist .= $indexpage;       
        if(preg_match('/pre/i', $listitem)) $plist .= $prepage;       
        if(preg_match('/pageno/i', $listitem)) $plist .= $listdd;       
        if(preg_match('/next/i', $listitem)) $plist .= $nextpage;       
        if(preg_match('/end/i', $listitem)) $plist .= $endpage;       
        if(preg_match('/option/i', $listitem)) $plist .= $optionlist;       
        if(preg_match('/info/i', $listitem)) $plist .= $maininfo;

        第二步:将上面的代码全部修改成下面的代码:
      
        $PageNo = $this->PageNo;       
        $TotalResult = $this->TotalResult;       
        $TotalPage = $totalpage;       
        $PageSize = $this->PageSize;       
        if(preg_match('/thisPage/i', $listitem)) $plist .= $PageNo;       
        if(preg_match('/TotalResult/i', $listitem)) $plist .= $TotalResult;       
        if(preg_match('/TotalPage/i', $listitem)) $plist .= $TotalPage;       
        if(preg_match('/PageSize/i', $listitem)) $plist .= $PageSize;       
        if(preg_match('/index/i', $listitem)) $plist .= $indexpage;       
        if(preg_match('/pre/i', $listitem)) $plist .= $prepage;       
        if(preg_match('/pageno/i', $listitem)) $plist .= $listdd;       
        if(preg_match('/next/i', $listitem)) $plist .= $nextpage;       
        if(preg_match('/end/i', $listitem)) $plist .= $endpage;       
        if(preg_match('/option/i', $listitem)) $plist .= $optionlist;       
        if(preg_match('/info/i', $listitem)) $plist .= $maininfo;

        第三步:保存修改配置文件后,接着我们要去我们的模版中自由的调用这些分页代码例如:
        ①:文档总数:{dede:pagelist listitem="TotalResult"/}
        ②、当前页码:{dede:pagelist listitem="thisPage"/}
        ③、分页大小:{dede:pagelist listitem="PageSize"/}
        ④、分页总数:{dede:pagelist listitem="TotalPage"/}
        完成前台模版调用后就可以去后台生成查看,这样织梦(dedecms)怎么自由的在列表页输出当前分页的问题就解决了!
        好了,以上便是关于(dedecms)怎么自由的在列表页输出当前分页问题的详细过程,经过测试这种方法可以轻松的解决列表页面的自由调用分页问题!通过这篇文章同时也说明了,织梦(dedecms)一些标签解决不了的问题大家可以试着去做下二次开发,兴许就会有拨开云雾的那一天!
打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

相关文章

共有26人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板