栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP > php开源框架 > dedecms

dedecms 列表 用分页标签 判断 当第一页则显示,第二页以上不显示 土办法!

dedecms 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

dedecms 列表 用分页标签 判断 当第一页则显示,第二页以上不显示 土办法!

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 "
  • {$totalpage}".$this->TotalResult."
  • "; $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.="
  • .str_replace("{page}",$prepagenum,$tnamerule)."'>上一页
  • ";             $indexpage="
  • .str_replace("{page}",1,$tnamerule)."'>首页
  • ";         }         else         {             $indexpage="
  • 首页
  • "; $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版条数不一样,二页往后内容完全不对应。适配失败。所以只能适配第一页。

    转载请注明:文章转载自 www.mshxw.com
    本文地址:https://www.mshxw.com/it/6070.html
    我们一直用心在做
    关于我们 文章归档 网站地图 联系我们

    版权所有 (c)2021-2022 MSHXW.COM

    ICP备案号:晋ICP备2021003244-6号