久久机这里只有精品,国产69精品一区二区亚洲孕妇,91精品国产综合久久婷婷香蕉,午夜久久久久久电影

最新活動(dòng):電腦PC端+手機(jī)端+微網(wǎng)站+自適應(yīng)網(wǎng)頁多模板選擇-建站388元起價(jià)!!!
當(dāng)前位置:主頁 > 網(wǎng)站建設(shè) > 織夢的專題模板應(yīng)用分析及解決方案,織夢技術(shù)

織夢的專題模板應(yīng)用分析及解決方案,織夢技術(shù)

時(shí)間:2023-07-21 11:07:21 閱讀: 文章分類: 網(wǎng)站建設(shè) 作者: dede技術(shù)員

導(dǎo)讀:織夢技術(shù)織夢技術(shù)廢話不多說了,自己在網(wǎng)上看到的,現(xiàn)在轉(zhuǎn)過來,提供給織夢愛好者研究吧。dede網(wǎng)站模板dede商城模板。

dede網(wǎng)站模板dede商城模板

  廢話不多說了,自己在網(wǎng)上看到的,現(xiàn)在轉(zhuǎn)過來,提供給織夢愛好者研究吧。

在官方的版本上有這樣的一段話:      1、文章列表用ID1,ID2,ID3這樣形式分開,系統(tǒng)會自動(dòng)排除不同節(jié)點(diǎn)的相同文章;      2、關(guān)于單條記錄模板里的[field:fieldname /]標(biāo)記的使用,請參考關(guān)于系統(tǒng)幫助關(guān)于 arclist 標(biāo)記的說明;      3、節(jié)點(diǎn)ID是節(jié)點(diǎn)的唯一標(biāo)識,允許在專題模板中用{dede:specnote id='標(biāo)識'/}這樣來表示單個(gè)節(jié)點(diǎn)。      4、正常的情況下,每個(gè)節(jié)點(diǎn)顯示的是“節(jié)點(diǎn)文章列表”里的文檔,如果你指定為“自動(dòng)獲取模式”,那么必須指定關(guān)鍵字和欄目ID。      可是經(jīng)測試{dede:specnote id='標(biāo)識'/}這個(gè)并沒有升效;因此開始解決這個(gè),以替換掉原來比較死板{dede:field name='note'/}標(biāo)簽;      舉例說明:      我要分兩欄顯示不同節(jié)點(diǎn)的文章,目前用"note"就不能實(shí)現(xiàn),只能是同一節(jié)點(diǎn)分欄,難免就顯得有些捌扭,不夠靈活。      下面我就把自己解決方案寫下供同學(xué)們參考,首先得申明一點(diǎn),只能是實(shí)現(xiàn)了功能,可算法不一定是最好的,因?yàn)槲也惶煜ぃ模牛模牛茫停哟a且沒有認(rèn)真的研究過,希望大家海涵!      步驟1:      文件位置:{include/inc_archives_view.php}      //廣告標(biāo)記      //-----------------------      else if($ctag->GetName()=="myad"){      $this->dtp->Assign($tagid,$this->PartView->GetMyAd($typeid,$ctag->GetAtt("name")));      }      // 專題標(biāo)識      // by phpfans      else if($ctag->GetName()=="specnote"){      $this->dtp->Assign($tagid,$this->ChannelUnit->GetSpecList('',$this->ChannelUnit->specrule,$ctag->GetAtt("id")));      }      介紹:{在廣告標(biāo)記下增加專題標(biāo)識}這樣專題文章列表頁就可以識別specnote標(biāo)簽了      步驟2:      文件位置:{include/inc_channel_unit.php}      var $specrule;      //-------------      //php5構(gòu)造函數(shù)      //-------------      介紹:增加了對$pecrule變量的定義      步驟3:      文件位置:{include/inc_channel_unit.php}      else if($ftype=="specialtopic"){      $this->specrule = $fvalue;      $fvalue = $this->GetSpecList($fname,$fvalue);      }      介紹:這兒增加了$this->specrule = $fvalue;這句,以便獲取addonspec表的note字段數(shù)據(jù);      步驟4:      文件位置:{include/inc_channel_unit.php}      //獲得專題文章的列表      //--------------------------------      function GetSpecList($fname,$noteinfo,$noteid="")      {      if(!isset($GLOBALS['__SpGetArcList織夢模板免費(fèi)下裁'])) require_once(dirname(__FILE__)."/inc/inc_fun_SpGetArcList.php");      if($noteinfo=="") return "";      $rvalue = "";      $tempStr = GetSysTemplets("channel/channel_spec_note.htm");      $dtp = new DedeTagParse();      $dtp->LoadSource($noteinfo);      if(is_array($dtp->CTags))      {      foreach($dtp->CTags as $k=>$ctag){      $notename = $ctag->GetAtt("name");      if($noteid!="" && $ctag->GetAtt("noteid")!=$noteid){ continue; } //指定名稱的專題節(jié)點(diǎn)      if($noteid!="" && $ctag->GetAtt("noteid")===$noteid) {      $isauto = $ctag->GetAtt("isauto");      $idlist = trim($ctag->GetAtt("idlist"));      $rownum = trim($ctag->GetAtt("rownum"));      if(empty($rownum)) $rownum = 40;      $keywords = "";      $stypeid = 0;      if($isauto==1){      $idlist = "";      $keywords = trim($ctag->GetAtt("keywords"));      $stypeid = $ctag->GetAtt("typeid");      }      if(trim($ctag->GetInnerText())!="") $listTemplet = $ctag->GetInnerText();      else $listTemplet = GetSysTemplets("spec_arclist.htm");      $idvalue = SpGetArcList($this->dsql,      $stypeid,$rownum,$ctag->GetAtt("col"),      $ctag->GetAtt("titlelen"),$ctag->GetAtt("infolen"),      $ctag->GetAtt("imgwidth"),$ctag->GetAtt("im織夢cms模板gheight"),      "all","default"dede,模板,$keywords,$listTemplet,100,0,$idlist);      $notestr = str_replace("~notename~",$notename,$tempStr);      $notestr = str_replace("~spec_arclist~",$idvalue,$notestr);      $rvalue .= $notestr;      if($noteid!="" && $ctag->GetAtt("noteid")==$noteid){ break; }      }      }      }      $dtp->Clear();      return $rvalue;      }      介紹:有些小改動(dòng),自己對比一下就清楚了,這兒就不再哆嗦了      步驟5:      說明: 原{dede:field name='note'/}標(biāo)簽失效了,如果要用的朋友請自行修改步驟四部份。。      很簡單的;完工!  

關(guān)鍵詞標(biāo)簽: 模板 解決方案 織夢

聲明: 本文由我的SEOUC技術(shù)文章主頁發(fā)布于:2023-07-21 ,文章織夢的專題模板應(yīng)用分析及解決方案,織夢技術(shù)主要講述模板,解決方案,織夢網(wǎng)站建設(shè)源碼以及服務(wù)器配置搭建相關(guān)技術(shù)文章。轉(zhuǎn)載請保留鏈接: http://www.bifwcx.com/article/web_33335.html

我的IDC 網(wǎng)站建設(shè)技術(shù)SEOUC.COM
專注網(wǎng)站建設(shè),SEO優(yōu)化,小程序設(shè)計(jì)制作搭建開發(fā)定制網(wǎng)站等,數(shù)千家網(wǎng)站定制開發(fā)案例,網(wǎng)站推廣技術(shù)服務(wù)。
  • 5000+合作客服
  • 8年從業(yè)經(jīng)驗(yàn)
  • 150+覆蓋行業(yè)
  • 最新熱門源碼技術(shù)文章

    主站蜘蛛池模板: 肇源县| 叶城县| 双峰县| 尚志市| 通许县| 措美县| 巴东县| 高邮市| 龙胜| 微山县| 卢湾区| 甘孜县| 开封市| 霍州市| 屯门区| 龙海市| 韩城市| 溧阳市| 滕州市| 澄城县| 黎城县| 赣榆县| 建宁县| 通城县| 永善县| 吉木萨尔县| 汽车| 通辽市| 锡林郭勒盟| 玉山县| 长葛市| 新干县| 定南县| 凌云县| 郴州市| 广德县| 灵石县| 吴川市| 天气| 广汉市| 九台市|