卡拉娃的爸爸 發表於 2023-11-8 00:00:00

dedecms列表页标题title后加上页数其标题不重复的方法

<p>
        在列表页的标题上中上页数使列表页的标题不重复这样更利于优化。 <br><br>
        标签为:{dede:pagelist listsize='0' listitem='pageno' function='html2text(@me)'/} <br><br>
        实例:&lt;title&gt;{dede:field.title/}_第{dede:pagelist listsize='0' listitem='pageno' function='html2text(@me)'/}页&lt;/title&gt; <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-&gt;ParseTempletsFirst(); <br>
        2.在262行$this-&gt;ParseDMFields($this-&gt;PageNo,1);前添加 <br>
        $this-&gt;Fields['pagexx'] = $this-&gt;PageNo; <br>
        $this-&gt;ParseTempletsFirst(); <br><br><strong>动态页的修改方法</strong> <br><br>
        3.在325行if((empty($this-&gt;PageNo) || $this-&gt;PageNo==1) 前添加 <br>
        $this-&gt;Fields['pagexx'] = $this-&gt;PageNo; <br><br><strong>list_article.htm模板的修改方法</strong> <br><br>
        &lt;title&gt;{dede:field.title/} / 第{dede:field.pagexx /}页&lt;/title&gt;</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]
查看完整版本: dedecms列表页标题title后加上页数其标题不重复的方法