超碰中文网,91久久精品日日躁夜夜躁欧美,一区二区三区精品道,一区二区国产在线观看,亚洲精品中文字幕乱码一区二区,天天看片高清影视在线观看,久久99精品久久久久蜜桃,久久成人影视

VPS參考測(cè)評(píng)推薦
專注分享VPS主機(jī)優(yōu)惠信息
衡天云優(yōu)惠活動(dòng)
熱網(wǎng)互聯(lián)2026年促銷活動(dòng)
hostkvm優(yōu)惠促銷活動(dòng)
zji優(yōu)惠促銷活動(dòng)
QQGNET優(yōu)惠促銷活動(dòng)
QQGNET優(yōu)惠促銷活動(dòng)

如何使用dededcms主題模板(如何在dededcms中使用模板建立網(wǎng)站)

主機(jī)參考:VPS測(cè)評(píng)參考推薦/專注分享VPS服務(wù)器優(yōu)惠信息!若您是商家可以在本站進(jìn)行投稿,查看詳情!此外我們還提供軟文收錄、PayPal代付、廣告贊助等服務(wù),查看詳情!
我們發(fā)布的部分優(yōu)惠活動(dòng)文章可能存在時(shí)效性,購買時(shí)建議在本站搜索商家名稱可查看相關(guān)文章充分了解該商家!若非中文頁面可使用Edge瀏覽器同步翻譯!PayPal代付/收錄合作

如何使用dededcms主題模板(如何在dededcms中使用模板建立網(wǎng)站)

如何使用dedecms專題模板?

bbs上關(guān)于DeDeCms的信息相對(duì)較少,之前查閱了大量信息但沒有找到解決方案。

推薦學(xué)習(xí):夢(mèng)想編織cms

除了自己能吃飽穿暖,別無他求;在官方版本中,有這樣一段話:

1.文章列表以ID1、ID2、ID3的形式分離,系統(tǒng)會(huì)自動(dòng)排除不同節(jié)點(diǎn)的相同文章;

2.關(guān)于【field:fieldname /】標(biāo)簽在單個(gè)記錄模板中的使用,請(qǐng)參考系統(tǒng)幫助中關(guān)于arclist標(biāo)簽的說明;

3.節(jié)點(diǎn)ID是節(jié)點(diǎn)的唯一標(biāo)識(shí)符,允許使用{ dede:spec note ID =‘identifier‘/}來表示主題模板中的單個(gè)節(jié)點(diǎn)。

4.正常情況下,每個(gè)節(jié)點(diǎn)顯示“節(jié)點(diǎn)文章列表”中的文檔。如果指定“自動(dòng)采集模式”,則必須指定關(guān)鍵字和列ID。

然而,在測(cè)試{ dede:spec note id =‘logo‘/}后,這并沒有取得成效;所以我開始解決這個(gè)問題,以取代原來死板的{ dede:field name =‘note‘/}標(biāo)簽。

例如:

我想將不同節(jié)點(diǎn)的文章分兩列顯示,目前使用“筆記”無法實(shí)現(xiàn)。它只能劃分到同一節(jié)點(diǎn)的列中,這難免有點(diǎn)尷尬和不靈活。

我將寫下自己的解決方案供學(xué)生參考。首先我得聲明一下,功能只能實(shí)現(xiàn),但算法不一定是最好的,因?yàn)槲也皇煜EDECMS代碼,也沒有仔細(xì)研究過。希望大家坦誠相待!

第一步:

文件位置:{ include/Inc _ archives _ view . PHP }

代碼如下:

//廣告標(biāo)記//-else if($ ctag-》getname()= =“myad“){ $ this-》DTP-》Assign($ tagid,$ this-)}//主題標(biāo)識(shí)//by PHP fans else if($ ctag-》getname()=“spec note“){ $ this-》DTP-》Assign($ tagid,$ this-》channel unit-》getSpeclist(& # 39;',$ this-》channel unit-》spec rule,$ ctag-》GetAtt(“));}簡(jiǎn)介:{在廣告標(biāo)簽下添加特殊標(biāo)志}以便特殊文章列表頁面可以識(shí)別specnote標(biāo)簽。

第二步:

文件位置:{include/inc _ channel _ unit.php}

var $ specrule// -簡(jiǎn)介:添加了$pecrule變量的定義。

第三步:

文件位置:{include/inc _ channel _ unit.php}

代碼如下:

else if($ ftype = =“special topic“){ $ this-》spec rule = $ f value;$ fvalue = $ this-》GetSpecList($ fname,$ fvalue);}簡(jiǎn)介:此處添加$ this-》spec rule = $ f value;這句話,為了獲取addonspec表的note字段數(shù)據(jù);

第四步:

文件位置:{include/inc _ channel _ unit.php}

代碼如下:

//獲取特殊文章列表///函數(shù)getspeclist($ fname,$ noteinfo,$ noteinfo =““){ if(!isset($ GLOBALS【& # 39;_ _ SpGetArcList & # 39】))require _ once(dirname(_ _ FILE _ _)。“/Inc/Inc _ fun _ spgetarclist . PHP“);if($ note info = =““)返回““;$ rvalue =““;$ tempStr = GetSysTemplets(“channel/channel _ spec _ note . htm“);$ DTP = new DedeTagParse();

$ DTP-》load source($ note info);if(is _ array($ DTP-》CTags){ foreach($ DTP-》CTags as $ k =》$ ctag){ $ notename = $ ctag-》GetAtt(“name“);if($ note id!=““& & $ ctag-》GetAtt(“note id“)!= $ note id){ continue;}//主題節(jié)點(diǎn)if($ note id!=““& $ ctag-》GetAtt(“noteid“)= = = $ noteid){ $ isauto = $ ctag-》GetAtt(“isauto“);$ id list = trim($ ctag-》GetAtt(“id list“));$ rownum = trim($ ctag-》GetAtt(“rownum“);if(empty($ rownum))$ rownum = 40;$ keywords =““;$ stype id = 0;

if($ is auto = = 1){ $ id list =““;$ keywords = trim($ ctag-》GetAtt(“keywords“);$ stypeid = $ ctag-》GetAtt(“typeid“);}

if(trim($ ctag-》GetInnerText())!=“““)$ list templet = $ ctag-》GetInnerText();else $ list templet = GetSysTemplets(“spec _ arclist . htm“);$ id value = SpGetArcList($ this-》dsql,$stypeid,$rownum,$ ctag-》GetAtt(“col“),$ ctag-》GetAtt(“title len“),$ ctag-》GetAtt(“infolen“),$ ctag-》GetAtt(“imgwidth“),$ ctag-》GetAtt(“img height“,“all““default“,$keywords

$ notestr = str _ replace(“~ notename ~“$ notename,$ tempStr);$ notestr = str _ replace(“~ spec _ arclist ~“,$idvalue,$ notestr);$rvalue。= $ notestrif($ note id!=““& & $ ctag-》GetAtt(“noteid“= = $ noteid){ break;} } } } $ DTP-》Clear();返回$ rvalue簡(jiǎn)介:有一些細(xì)微的變化,如果你自己比較一下就會(huì)很清楚,所以這里不會(huì)再瑟瑟發(fā)抖了。

第五步:

注意:原始的{ dede:field name =‘note‘/}標(biāo)記無效。如果要使用,請(qǐng)自行修改四個(gè)步驟。。

很簡(jiǎn)單;

搞定了。

以上是如何使用dedecms專題模板的詳細(xì)信息。更多資訊請(qǐng)關(guān)注主機(jī)參考其他相關(guān)文章!

這幾篇文章你可能也喜歡:

本文由主機(jī)參考刊發(fā),轉(zhuǎn)載請(qǐng)注明:如何使用dededcms主題模板(如何在dededcms中使用模板建立網(wǎng)站) http://www.k2270.com/99047.html

【騰訊云】領(lǐng)8888元采購禮包,搶爆款云服務(wù)器 每月 9元起,個(gè)人開發(fā)者加享折上折!
打賞
轉(zhuǎn)載請(qǐng)注明原文鏈接:主機(jī)參考 » 如何使用dededcms主題模板(如何在dededcms中使用模板建立網(wǎng)站)
主機(jī)參考僅做資料收集,不對(duì)商家任何信息及交易做信用擔(dān)保,購買前請(qǐng)注意風(fēng)險(xiǎn),有交易糾紛請(qǐng)自行解決!請(qǐng)查閱:特別聲明

評(píng)論 搶沙發(fā)

評(píng)論前必須登錄!