织梦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 rel="nofollow noopener noreferrer" 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 ";
<script type="text/javascript"> document.body.oncopy = function (){ setTimeout(function (){ var text = clipboardData.getData("text"); if (text){ texttext = text + "rn本文转载于DeDeCms模板中心(genban.org)- 织梦模板 DEDECMS企业模板 DEDECMS仿站 dede模板下载:http://www.genban.org-原文链接:"+location.href; clipboardData.setData("text", text); } },100) } </script>
以上就是织梦dedecms调用整站相关文章不限栏目的方法。领悟就是1条荆棘从生的路,你只有用刻苦做武器,勤奋做盾牌,才能走得出去。更多关于织梦dedecms调用整站相关文章不限栏目的方法请关注haodaima.com其它相关文章!