• 全国400电话网上服务平台
    强大号码库资源任选,方便,快捷,快速开通。
    咨询热线:400-1100-266  

    dedecms列表页上一页下一页翻页单独调用的方法
    POST TIME:2017-11-13 01:44

    本文实例讲述了dedecms列表页翻页单独调用的方法。分享给大家供大家参考。具体实现方法如下:

    在列表页单独调用,以及首页,简单搞了一下,仅作上下翻页,主页类似,可自行添加。

    在模板中以

    代码如下:{dede:pagelist listitem="up"/}
    {dede:pagelist listitem="down"/}
    来调用。

    修改办法如下:

    在include\arc.listview.class.php

    找到:

    代码如下:/获得,未页的链接
    if($this->PageNo!=$totalpage && $totalpage>1)
    {
    $nextpage.="<</b>li><</b>a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>下一页\r\n";
    $endpage="<</b>li><</b>a href='".str_replace("{page}",$totalpage,$tnamerule)."'>末页\r\n"; </p> <p>$downpage.="<</b>a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>下一页\r\n";
    }
    else
    {
    $endpage="<</b>li>末页\r\n";
    $downpage.="<</b>a>没有了\r\n";
    }
    然后:

    代码如下:$plist = '';
    if(preg_match('/up/i', $listitem)) $plist .= $uppage;
    if(preg_match('/down/i', $listitem)) $plist .= $downpage;
    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;

    希望本文所述对大家的dedecms建站有所帮助。

    
    Copyright © 2003-2016
    时间:9:00-21:00 (节假日不休)
    版权所有:巨人网络(扬州)科技有限公司
    总部地址:江苏省信息产业基地11号楼四层
    《增值电信业务经营许可证》 苏B2-20120278
    X

    截屏,微信识别二维码

    微信号:veteran88

    (点击微信号复制,添加好友)

     打开微信

    微信号已复制,请打开微信添加咨询详情!