Channel標(biāo)簽一般用于循環(huán)調(diào)用欄目,在用DeDe系統(tǒng)進(jìn)行網(wǎng)站建設(shè)時(shí),經(jīng)常會(huì)利用該標(biāo)簽調(diào)用欄目信息,但是,該標(biāo)簽卻無(wú)法調(diào)用欄目description或content標(biāo)簽,我們要做的只是將Description這個(gè)屬性開(kāi)啟即可。
到你的程序目錄 include\taglib 找到 channel.lib.php 修改一下文件,查找sitepath, 在后面加上description,content 一共修改4處,紅色部分是添加的,修改后代碼:
if($type=='top') { $sql = "SELECT id,typename,typedir,typebigpic,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description,content From `dede_arctype` WHERE reid=0 And ishidden<>1 order by sortrank asc limit 0, $line "; } else if($type=='son') { if($typeid==0) return ''; $sql = "SELECT id,typename,typedir,typebigpic,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description,content From `dede_arctype` WHERE reid='$typeid' And ishidden<>1 order by sortrank asc limit 0, $line "; } else if($type=='self') { if($reid==0) return ''; $sql = "SELECT id,typename,typedir,typebigpic,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description,content FROM `dede_arctype` WHERE reid='$reid' And ishidden<>1 order by sortrank asc limit 0, $line "; } //And id<>'$typeid' $needRel = false; $dtp2 = new DedeTagParse(); $dtp2->SetNameSpace('field','[',']'); $dtp2->LoadSource($innertext); //檢查是否有子欄目,并返回rel提示(用于二級(jí)菜單) if(preg_match('#:rel#', $innertext)) $needRel = true; if(empty($sql)) return ''; $dsql->SetQuery($sql); $dsql->Execute(); $totalRow = $dsql->GetTotalRow(); //如果用子欄目模式,當(dāng)沒(méi)有子欄目時(shí)顯示同級(jí)欄目 if($type=='son' && $reid!=0 && $totalRow==0) { $sql = "SELECT id,typename,typedir,typebigpic,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath,description,content FROM `dede_arctype` WHERE reid='$reid' And ishidden<>1 order by sortrank asc limit 0, $line "; $dsql->SetQuery($sql); $dsql->Execute(); } |
版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: 織夢(mèng)讓dede:channel支持調(diào)用欄目描述description或欄目?jī)?nèi)容conte