大佬教程收集整理的这篇文章主要介绍了修改dede源码,让dede:channelartlist排除指定typeid,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
找到 \include\taglib\chAnnelartlist.lib.PHP, 查找 $attlist
将
$attlist = 'typEID|0,row|20,cachEID|';
修改为:
$attlist = 'typEID|0,cachEID|,notypeid|0'; [此处添加了一个所要排除typEID的参数---notypeid]
查找:
$dsql->SetQuery("SELEct id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath from `dede_arctype` where $tpsql order by sortrank asc limit $@R_767_10586@lnum");
//否定指定ID
if($notypeid!=0) {
$tpsql = $tpsql."and not(id in($notypeid)) ";
}
模板调用:
{dede:chAnnelartlist typEID ='114' notypeid='123,124,125,126,127,128'}
其中notypeid='123,128' 中的 123,128 为114的子栏目
<>PHP
FillAttsDefault(
->CAttribute->Items,0) !important; border-radius: 0px !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; Box-sizing: content-Box !important; font-size: 1em !important; @R_197_11442@kground: none !important;">$attlist
);
PHP variable" style="font-family: Consolas,EXTR_SKIP);
= trim(
->GetInnerText());
''
;
$cacheid
);
!=
) {
= GetCacheBlock(
);
$artlist
)
return
;
empty
$typeid
))
= ( !
->TypeLink->TypeInfos[
'id'
]) ?
] : 0 );
{
;
$row
->GetArray()) {
[
'itemindex'
] = 0;
] = 1;
->GetResult();
]==1 ? 2 : 1);
);
以上是大佬教程为你收集整理的修改dede源码,让dede:channelartlist排除指定typeid全部内容,希望文章能够帮你解决修改dede源码,让dede:channelartlist排除指定typeid所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。