讓dedecms支持notypeid的屬性,dedecms
導讀:dedecmsdedecms打開 /include/taglib/arclist.lib.php 文件,找這段代碼(大概在130行): return lib_arclistDone ( $dede模板堂dede后臺模板。
打開/include/taglib/arclist.lib.php文件,找這段代碼(大概在130行):
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->Ge夢織模板tAtt('subday'), $ctag->GetAtt('noflag'),
$tagid,$pagesize,$isweight
);
在最后括號最后加上(注意前面的逗號):
,$ctag->GetAtt('notypeid')
然后再找到這一段代碼(大概在168行):
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, $iddede下瓻模板下載list='', $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).")";
}
這樣,代碼就修改完畢了。保存之后就在arclist標簽里試試看notypeid屬性吧。對于網站欄目多,內容顯示時又錯綜復雜的情況,這樣的屬性還是蠻實用的。
使用方法:
{dede:arclist row=6 orderby=pubdate type='image.' imgwidth='108' imgheight='150' channelid='1' notypeid='1'}
相關dede模板堂dede后臺模板。聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-18 ,文章讓dedecms支持notypeid的屬性,dedecms主要講述屬性,標簽,dedecms網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_29485.html