zoukankan      html  css  js  c++  java
  • 如何给织梦文章分页标题加上序号呢?

      为了方便浏览者的阅读,我们可以在织梦dedeCMS的分页文章标题加上序号。我们先来分析一下,
      经过研究我们发现织梦模板文章分页所需要的文件是arc.archives.class.php ,
      所以我们可以通过添加一句代码,为织梦模板文章分页标题加上序号。下面是具体操作过程:
      修改文件:/include/arc.archives.class.php
      行数:大约347行 (行数可能由于更新有变化)
      修改代码如下:https://www.xuanhe.net
      //循环生成HTML文件
      else
      {
      for($i=1;$i<=$this->TotalPage;$i++)
      {
      $tempTitle=$this->Fields['title'];//临时存储一个标题副本
      if($i>1)
      {
      $truefilename = $this->GetTruePath().$fileFirst."_".$i.".".$this->ShortName;
      //为分页标题加上序号。2009.2.13
      $this->Fields['title'] = $this->Fields['title'].'('.$i.')';//在标题后面多加个序号
      }
      else
      {
      $truefilename = $this->GetTruePath().$filename;
      }
      $this->ParseDMFields($i,1);
      $this->dtp->SaveTo($truefilename);
      $this->Fields['title']=$tempTitle;//生成html,还原标题
      }
      }

  • 相关阅读:
    struts2 和 js 标签取值
    使用jQuery 取文本
    a 标签 name 属性 页面定位 (一)
    a 标签 name 属性 页面定位 (二)
    GitHub 出现这样的问题怎么办
    金融政策
    基金基础知识
    bitcoinj学习记录
    金融电影
    黑客
  • 原文地址:https://www.cnblogs.com/zqw111/p/13030302.html
Copyright © 2011-2022 走看看