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

    dedecms 列表 用分页标签 判断 当第一页则显示,第二页以上不显示 土办法!
    POST TIME:2021-05-23 01:50

    arc.listview.class.php

    function GetPageListST($list_len,$listitem="index,end,pre,next,pageno,spurl")  // ,spurl新增的
    ,spurl新境的
    
    
    1
    2
    3
    4
    5
    $purl $this->GetCurUrl();
    $maininfo "<li><span class="pageinfo">共 <strong>{$totalpage}</strong>页<strong>".$this->TotalResult."</strong>条</span></li> ";
    $tnamerule $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields['namerule2']);
    $tnamerule = preg_replace("/^(.*)//"''$tnamerule);
    $typedirereg_replace('{cmspath}',$GLOBALS['cfg_cmspath'],$this->Fields['typedir']); //新增的

      

    1
    2
    3
    4
    5
    6
    7
    8
    9
            if($this->PageNo != 1)
            {
                $prepage.="<li><a href='".str_replace("{page}",$prepagenum,$tnamerule)."'>上一页</a></li> ";
                $indexpage="<li><a href='".str_replace("{page}",1,$tnamerule)."'>首页</a></li> ";
            }
            else
            {
                $indexpage="<li>首页</li> ";
    $spurlpage$GLOBALS['cfg_basehost'].$typedir."/";  //新增的
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
        }
        $plist '';
        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;
        if(preg_match('/spurl/i'$listitem)) $plist .= $spurlpage;  //新增的
        
        return $plist;
    }

      list_article.htm 调用 {dede:pagelist listitem="spurl" listsize="0"/}

     

    当第一页则显示列表的网址,第二页往后则不显示。用于百度移动适配,因为移动版与PC版条数不一样,二页往后内容完全不对应。适配失败。所以只能适配第一页。

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

    截屏,微信识别二维码

    微信号:veteran88

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

     打开微信

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