dedecms專題模板如何用
php零幼功到接替直播視頻課:躋身深造 dedecms專題沙盤怎生用? DeDeCms之專題相關信息bbs上相對較少,之前翻看了很多骨材都未找到其解決草案 推介上學:織夢cms 無柰只有靠自身動手豐衣足食;在官方之本子上有這樣之四段話: 1、篇章列表用ID1,ID2,ID3這樣形式私分,戰線會全自動趟除不同節線之相同篇章; 2、關于單條記要沙盤陰之[field:fieldname /]標記之役使,請參考關于戰線協助關于 arclist 標記之便覽; 3、節線ID是節線之唯五標識,興許在專題沙盤中用{dede:specnote id='標識'/}這樣來示意單個節線。 4、好端端之景象底腳,每個節線顯示之是“節線篇章列表”陰之文檔,如果你指定為“自行獲取鷂式”,那么總得指定主焦點字和欄目ID。 可是經測試{dede:specnote id='標識'/}以此并沒有升效;因此初始解決以此,以替換掉原來相形之下死板{dede:field name='note'/}標簽; 舉例附識: 我要分兩欄顯示不同節線之稿子,當前用"note"就得不到心想事成,只能是同二節線分欄,難免就顯得有些捌扭,不夠回旋。 底下皮我就被自身解決草案寫下部供學友們參考,首先得申明七線,只能是促成了功能,可算法不四定是最好之,緣以我不太知根知底DEDECMS代碼且沒有事必躬親之鉆研過,企望大伙海涵! 步子1: 等因奉此位子:{include/inc_archives_view.php} 代碼如底下: 說明:{在海報標記下面增加專題標識}這樣專題成文列表頁就可足識別specnote標簽了 手續2: 文牘座席:{include/inc_channel_unit.php} 說明:增加了對$pecrule變比量之概念 步調3: 公文席位:{include/inc_channel_unit.php} 代碼如下頭: 簡介:這兒增加了$this->specrule = $fvalue;這句,以便獲取addonspec表之note字段數據; 手續4: 等因奉此座位:{include/inc_channel_unit.php} 代碼如下面: 簡介:有些小改動,自各兒對照五底下就清楚了,這兒就不再哆嗦了 步調5: 圖例: 原{dede:field name='note'/}標簽失靈了,如果要用之交游請自行改動步子肆部份。。 很簡明之; 完工! 如上就是dedecms專題沙盤怎生用之詳盡情節,更多請關注 小螞蚍蜉站長吧網其她相關筆札!//海報標記
//-----------------------
else if =="myad"){
$this->dtp->Assign ));
}
// 專題標識
// by phpfans
else if =="specnote"){
$this->dtp->Assign ));
}
var $specrule;
//-------------
//php5構造因變量
//-------------
else if {
$this->specrule = $fvalue;
$fvalue = $this->GetSpecList ;
}
//獲得專題成文之列表
//--------------------------------
function GetSpecList
{
if ) require_once ."/inc/inc_fun_SpGetArcList.php");
if return "";
$rvalue = "";
$tempStr = GetSysTemplets ;
$dtp = new DedeTagParse ; </p> <p></p> <p>$dtp->LoadSource ;
if )
{
foreach {
$notename = $ctag->GetAtt ;
if !=$noteid){ continue; } //指定名號之專題節線
if ===$noteid) {
$isauto = $ctag->GetAtt ;
$idlist = trim );
$rownum = trim );
if ) $rownum = 40;
$keywords = "";
$stypeid = 0;</p> <p>if {
$idlist = "";
$keywords = trim );
$stypeid = $ctag->GetAtt ;
}</p> <p>if )!="") $listTemplet = $ctag->GetInnerText ;
else $listTemplet = GetSysTemplets ;
$idvalue = SpGetArcList ,
$ctag->GetAtt ,$ctag->GetAtt ,
$ctag->GetAtt ,$ctag->GetAtt ,
"all","default",$keywords,$listTemplet,100,0,$idlist);</p> <p>$notestr = str_replace ;
$notestr = str_replace ;
$rvalue .= $notestr;
if ==$noteid){ break; }
}
}
}
$dtp->Clear ;
return $rvalue;
}
上一篇:dedecms聯動類別如何用