加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > CMS系统 > Dedecms > 正文

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

发布时间:2020-12-14 04:21:08 所属栏目: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 ? =? "lispan class="pageinfo"共 strong{$totalpage}/stro

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>".->TotalResult."</strong>条</span></li> ";
->GetMakeFileRule(->Fields['id'],"list",'typedir''defaultname''namerule2']);
= preg_replace("/^(.*)//"''$tnamerule);
=?ereg_replace('{cmspath}'$GLOBALS['cfg_cmspath']);?//新增的

  

????????if(->PageNo != 1)
????????{
$prepage.="<li><a href='".str_replace"{page}"$prepagenum)."'>上一页</a></li> ";
$indexpage="'>首页</a></li> ";
else
"<li>首页</li> ";
'cfg_basehost'].."/";??//新增的
????}
????$plist?????(preg_match('/index/i'$listitem))?.=?'/pre/i''/pageno/i'$listdd;
'/next/i'$nextpage;
$endpage;
'/option/i'$optionlist'/info/i'$maininfo;
'/spurl/i'//新增的
return?$plist;
}

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

?

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

上一篇:DedeCMS列表文章无缩略图自动隐藏默认缩略图

下一篇:Dedecms限制栏目列表生成的最大页数

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读