POST TIME:2019-09-30 15:00
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 agliblikearticle.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 ";
上一篇:织梦cms如何防采集