長沙做網站教你如何調用dedecms整站相關文章不限欄目的方法
這里高用相關文章,以關鍵字來匹配
<div class="hot mt1"> <dl class="tbox"> <dt><strong>相關文章</strong></dt> <dd> <ul class="c1 ico2"> {dede:likearticle col='2' row='10' titlelen='42'} <li><a href="[field:arcurl/]">[field:title/]</a></li> {/dede:likearticle} </ul> </dd> </dl> </div>
再找到文件:\include\taglib\likearticle.lib.php
其實tags和關鍵字都可以匹配的,當然只能二選一
下面說不限欄目的修改
到 74行和84行,分別修改代碼
$typeid = " And arc.typeid in($typeid) And arc.id<>$arcid "; $typeid = " And arc.id<>$arcid ";
和
$typeid = " where arc.typeid in($typeid) And arc.id<>$arcid "; $typeid = " where arc.id<>$arcid ";
Copyright © 2009-2019 Ywcms.Com All Right Reserved. 湘ICP備16006489號-2