dedecms列表页标题title后加上页数其标题不重复的方法
<p>在列表页的标题上中上页数使列表页的标题不重复这样更利于优化。 <br><br>
标签为:{dede:pagelist listsize='0' listitem='pageno' function='html2text(@me)'/} <br><br>
实例:<title>{dede:field.title/}_第{dede:pagelist listsize='0' listitem='pageno' function='html2text(@me)'/}页</title> <br><br>
只适用于列表页,且该栏目内容不止一页的情况下,可使用版本包括dedecms v5.1至v5.6。v5.7未测试。测试过的朋友可以说下管用不。 <br><br><strong>修改php的方法为:</strong> <br><br>
DedeCMS修改列表页标题成“列表名-第xx页”需要修改include/arc.listview.class.php <br><br><strong>静态页的修改方法</strong> <br><br>
1.删掉236行 $this->ParseTempletsFirst(); <br>
2.在262行$this->ParseDMFields($this->PageNo,1);前添加 <br>
$this->Fields['pagexx'] = $this->PageNo; <br>
$this->ParseTempletsFirst(); <br><br><strong>动态页的修改方法</strong> <br><br>
3.在325行if((empty($this->PageNo) || $this->PageNo==1) 前添加 <br>
$this->Fields['pagexx'] = $this->PageNo; <br><br><strong>list_article.htm模板的修改方法</strong> <br><br>
<title>{dede:field.title/} / 第{dede:field.pagexx /}页</title></p>
<p class="clearfix">
</p>
<div class="tags mb10 clearfix">
<ul class="meta-tags items" style='margin: 0px; padding-right: 0px; padding-left: 0px; outline: none; list-style: none; max-width: 500px; line-height: 12px; font-family: tahoma, arial, "Microsoft YaHei";'></ul>
</div>
<p>
</p>
頁:
[1]