让dede:channelartlist支持channelid调用。 如:{dede:channelartlist channelid='1'}
解决:打开include/taglib/channelartlist.lib.PHP
1. 找到代码
$attlist = 'typeid|0,row|20,cacheid|';
修改成
$attlist = 'typeid|0,cacheid|,channelid|';
2. 找到
修改成
$attlist = 'typeid|0,cacheid|,channelid|';
2. 找到
//获得类别ID总数的信息
$typeids = array();
if($typeid==0 || $typeid=='top') {
$tpsql = " reid=0 AND ispart<>2 AND ishidden<>1 AND channeltype>0 ";
}
else
{
if(!preg_match('#,#',$typeid)) {
$tpsql = " reid='$typeid' AND ispart<>2 AND ishidden<>1 ";
}
else {
$tpsql = " id IN($typeid) AND ispart<>2 AND ishidden<>1 ";
}
原文链接:https://www.f2er.com/dedecms/533324.html