<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

织梦dede如何让摘要只出现在文章的第一页

时间:2020-12-16

其实在织梦dedecms前台显示的时候,所有对文章内容的解析都是通过 /include/arc.archives.class.php 进行处理的,所有列表页的解析都是通过 /include/arc.listview.class.php进行处理的,

所以我们得走arc.archives.class.php里面去找。  要想读懂织梦dedecms里面的全部代码,还是有一些难度,反正我是还没有完全把里面的代码搞懂。

     
     我还是直接说方法吧,打开 /include/arc.archives.class.php  在找到ParseDMFields方法,在方法里面把if($pageNo>1) $this->Fields['description'] = trim(preg_replace("/[\r\n\t]/", ' ', cn_substr(html2text($this->Fields[$this->SplitPageField]), 200)));  修改成 if($pageNo>1) $this->Fields['description'] = '';   

它这里的意思就是,当页数大于0的时候 摘要就为空。 修改之后的结果就是
$this->NowPage = $pageNo; $this->Fields['nowpage'] = $this->NowPage; if($this->SplitPageField!='' && isset($this->Fields[$this->SplitPageField])) { $this->Fields[$this->SplitPageField] = $this->SplitFields[$pageNo - 1]; //if($pageNo>1) $this->Fields['description'] = trim(preg_replace("/[\r\n\t]/", ' ', cn_substr(html2text($this->Fields[$this->SplitPageField]), 200))); if($pageNo>1) $this->Fields['description'] = ''; }

然后在模板调用的调用:

{dede:field.description runphp='yes'} if(@me<>'' )@me = '<div class="intro">'.@me.'</div>'; {/dede:field.description}
    0
    首页
    案例
    关于
    联系