织梦dedecms系统网站artlist标签实现notypeid属性
打开/include/taglib/arclist.lib.php文件:
找到
return lib_arclistDone
(
$refObj, $ctag, $typeid, $ctag->GetAtt(‘row’), $ctag->GetAtt(‘col’), $titlelen, $infolen,
$ctag->GetAtt(‘imgwidth’), $ctag->GetAtt(‘imgheight’), $listtype, $orderby,
$ctag->GetAtt(‘keyword’), $innertext, $envs[‘aid’], $ctag->GetAtt(‘idlist’), $channelid,
$ctag->GetAtt(‘limit’), $flag,$ctag->GetAtt(‘orderway’), $ctag->GetAtt(‘subday’), $ctag->GetAtt(‘noflag’),
$tagid,$pagesize,$isweight
);
在最后的;前面加上
,$ctag->GetAtt(‘notypeid’)
再找到
function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160,
$imgwidth=120, $imgheight=90, $listtype=’all’, $orderby=’default’, $keyword=”,
$innertext=”, $arcid=0, $idlist=”, $channelid=0, $limit=”, $att=”, $order=’desc’, $subday=0, $noflag=”,$tagid=”, $pagesize=0, $isweight=’N’)
在他后面加上
,$notypeid=0
再找到
$orwheres[] = ‘ arc.arcrank > -1 ‘;
在它上面加上
if(!empty($notypeid))
{
$orwheres[] = ” and arc.typeid NOT IN (“.GetSonIds($notypeid).”)”;
}
模板调用:
{dede:arclist row=6 orderby=pubdate type=’image.’ imgwidth=’108′ imgheight=’150′ channelid=’1′ notypeid=’9′}