arc.listview.class.php

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

  

        if($this->PageNo != 1)
{
$prepage.="<li><a href='".str_replace("{page}",$prepagenum,$tnamerule)."'>上一页</a></li>\r\n";
$indexpage="<li><a href='".str_replace("{page}",1,$tnamerule)."'>首页</a></li>\r\n";
}
else
{
$indexpage="<li>首页</li>\r\n";
$spurlpage= $GLOBALS['cfg_basehost'].$typedir."/"; //新增的

  

        }
$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版条数不一样,二页往后内容完全不对应。适配失败。所以只能适配第一页。

dedecms 列表 用分页标签 判断 当第一页则显示,第二页以上不显示 土办法!的更多相关文章

  1. jsp 分页, 判断是第一页,和最后一页.

    <% //页的行数 int pagesize =20; //当前页 int currentPage = 1; try { currentPage = Integer.parseInt(reque ...

  2. java超强分页标签演示

    最近在做一个项目,用到了一个分页,于是动手写了个分页标签,先将代码贴出来,供大家交流,写的不好,请见谅!. 以下是java标签类,继承自SimpleTagSupport package com.lyn ...

  3. ViewPagerWithImageDemo【ViewPager如何判断滑动到第一页和最后一页以及弹出对话框功能】

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 记录viewpager滑动的时候弹出对话框的功能(关键功能是滑动弹出对话框后,隐藏对话框的时候当前页可以还原到原位置),顺便判断首页 ...

  4. 织梦DeDeCms列表分页和内容页分页错位解决办法

    文章页分页代码在这里/include/arc.archives.class.php列表页分页/include/arc.listview.class.php 很多入门的站长会碰到这样的问题,织梦的通病, ...

  5. 织梦dedecms列表页dede:pagelist分页问题

    pagelist是dede定义的一个分页标签.有时直接引用这个标签的时候,会出现分页标签变形问题.我在使用非默认模板的时候就遇到过两次. pagelist本身就有一些样式是在include/arc.l ...

  6. dedecms列表页调用子栏目列表,织梦首页调用栏目的子栏目标签代码

    dedecms列表页调用子栏目列表,织梦首页调用栏目的子栏目标签代码. dedecms列表页调用子栏目列表标签: {dede:channelartlist type='sun' }<a href ...

  7. 织梦DedeCMS会员空间内的文章列表无法分页的解决方法

    DedeCMS 5.7会员空间的文章列表分页显示不正常,总是显示0页0条记录错误.下面告诉大家如何解决这个问题: 找到并打开include/arc.memberlistview.class.php文件 ...

  8. dedecms的arclist循环中判断第一个li添加css,否则不加

    dedecms的arclist循环中,判断如果是第一个li,则添加固定的css,否则不加   写法如下: {dede:arclist row=4 flag='p'} <li [field:glo ...

  9. DedeCMS织梦模板标签调用大全

    本文转载:http://www.mubanzhijia.com/jishujiaocheng/1.html 关键描述调用标签: <meta name="keywords" c ...

随机推荐

  1. 【导航】JennyHui 老白兔记录贴

    英语控 TED X - > 笔记 程序媛 2019-08-24 Java学习路径规划 思考记录 2018-08-24 常见的工作思考方式 浪费时间 百家讲坛 开卷八分钟

  2. swift--【do..catch与try,try?,try!】

    throws抛出异常, 那么就必须通过try来处理 try : 标准的处理方式, 该方式必须结合do catch来处理 try? :告诉系统可能有错, 也可能没错, 如果发生错误, 那么返回nil, ...

  3. PHP中获取当前页面的完整URL、PHP URL处理、获取不带扩展名的文件名

    javascript实现: top.location.href 顶级窗口的地址this.location.href 当前窗口的地址 PHP实现 #测试网址: http://localhost/blog ...

  4. alt + tab 替代品 switcheroo

    作为windows10 alt+tab的增强品: 分享下: 原版: https://github.com/elig0n/Switcheroo 单击版本 https://github.com/elig0 ...

  5. Windows安装使用npm(Nodejs)

    转载参考:https://blog.csdn.net/han0373/article/details/80606487 1:下载 https://nodejs.org/en/ 2:查看是否安装成功 w ...

  6. yum安装epel源

    国内yum源的安装(163,阿里云,epel)   国内yum源的安装(163,阿里云,epel) ----阿里云镜像源 1.备份 mv /etc/yum.repos.d/CentOS-Base.re ...

  7. python爬虫小实例

    1.python爬取贴吧壁纸 1.1.获取整个页面数据 #coding=utf-8 import urllib def getHtml(url): page = urllib.urlopen(url) ...

  8. JavaScript(1):Base/Tips

    目录 输出 全局变量 字符串 类型及转换 变量提升 严格模式 表单验证 (1) 输出 <!DOCTYPE html> <html> <body> <p> ...

  9. Linux下python安装升级详细步骤 | Python2 升级 Python3 转载

    Linux下python升级步骤  Python2 ->Python3 多数情况下,系统自动的Python版本是2.x 或者yum直接安装的也是2.x 但是,现在多数情况下建议使用3.x 那么如 ...

  10. Java利用PushbackReader实现返回对文本中的指定字符串之前的内容

    import java.io.FileReader; import java.io.PushbackReader; public class PushbackTest { public static ...