中文国产日韩欧美视频,午夜精品999,色综合天天综合网国产成人网,色综合视频一区二区观看,国产高清在线精品,伊人色播,色综合久久天天综合观看

DedeCMS標(biāo)簽手冊(cè) 各類標(biāo)簽代碼說(shuō)明 -電腦資料

電腦資料 時(shí)間:2019-01-01 我要投稿
【www.szmdbiao.com - 電腦資料】

  最近一直很忙,都沒(méi)時(shí)間整理SEO博客了,正在計(jì)劃做一個(gè)社區(qū),社區(qū)的做的情況如何暫時(shí)就不透露,希望大家多多關(guān)注我的SEO博客,可以告訴大家的是社區(qū)里面可以發(fā)外鏈,另外有發(fā)布消息以及SEO技術(shù)的專區(qū),歡迎大家到時(shí)候來(lái)社區(qū)交流,

DedeCMS標(biāo)簽手冊(cè) 各類標(biāo)簽代碼說(shuō)明

  由于工作要求所以最近在進(jìn)行網(wǎng)站制作工作,逛百度的時(shí)候發(fā)現(xiàn)一個(gè)好東西,針對(duì)學(xué)習(xí)DedeCMS的同學(xué)大有幫助,這基本可以看做是一本字典的,各種標(biāo)簽的意思都有,另外以前發(fā)表的是DedeCMS調(diào)用標(biāo)簽的標(biāo)簽寫(xiě)法,這次則是每個(gè)單詞的意思都列舉出來(lái)了,非常全,分享給愛(ài)好學(xué)習(xí)DedeCMS的同學(xué),希望能夠幫上大家。

  【arclist 標(biāo)記】

  這個(gè)標(biāo)記是DedeCms最常用的一個(gè)標(biāo)記,也叫自由列表標(biāo)記,其中 hotart、coolart、likeart、artlist、imglist、imginfolist、specart、autolist 這些標(biāo)記都是由這個(gè)標(biāo)記所定義的不同屬性延伸出來(lái)的別名標(biāo)記。

  功能說(shuō)明:獲取指定的文檔列表

  適用范圍:封面模板、列表模板、文檔模板

  基本語(yǔ)法:

  <span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>arclist typeid<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> row<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> col<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> titlelen<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> infolen<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> imgwidth<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> imgheight<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> listtype<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> orderby<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> keyword<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span><span class="sh_cbracket">}</span>

  底層模板(InnerText)

  {/dede:arclist}

  屬性說(shuō)明:

  [1] typeid='' 表示欄目ID,在列表模板和檔案模板中一般不需要指定,在封面模板中允許用","分開(kāi)表示多個(gè)欄目;

  [2] row='' 表示返回文檔列表總數(shù);

  [3] col='' 表示分多少列顯示(默認(rèn)為單列);

  [4] titlelen='' 表示標(biāo)題長(zhǎng)度;

  [5] infolen='' 表示內(nèi)容簡(jiǎn)介長(zhǎng)度;

  [6] imgwidth='' 表示縮略圖寬度;

  [7] imgheight='' 表示縮略圖高度;

  [8] type='' 表示檔案類型,其中空值、不使用這個(gè)屬性或type='all'時(shí)為普通文檔

  § type='commend'時(shí),表示推薦文檔,等同于 {dede:coolart}{/dede:coolart}

  § type='image'時(shí),表示必須含有縮略圖片的文檔,等同于{dede:imglist}{/dede:imglist}、{dede:imginfolist}{/dede:imginfolist}

  § type='spec'時(shí),表示專題,等同于標(biāo)記{dede:specart}{/dede:specart}

  以上屬性值可以聯(lián)合使用,如: type='commend image' 表示推薦的圖片文檔

  [9] rderby='' 表示排序方式,默認(rèn)值是 senddate 按發(fā)布時(shí)間排列。

  § rderby='hot' 或 rderby='click' 表示按點(diǎn)擊數(shù)排列

  § rderby='pubdate' 按出版時(shí)間排列(即是前臺(tái)允許更改的時(shí)間值)

  § rderby='sortrank' 按文章的新排序級(jí)別排序(如果你想使用置頂文章則使用這個(gè)屬性)

  § rderby='id' 按文章ID排序

  § rderby='postnum' 按文章評(píng)論次數(shù)排序

  § rderby='rand' 隨機(jī)獲得指定條件的文檔列表

  [10] rderway='' 值為 desc 或 asc ,指定排序方式是降序還是順向排序,默認(rèn)為降序。

  [11] keyword='' 表示含有指定關(guān)鍵字的文檔列表,多個(gè)關(guān)鍵字用","分開(kāi)

  [12] channelid='' 表示特定的頻道模型ID,內(nèi)置的頻道:專題(-1)、文章(1)、圖集(2)、Flash(4)、軟件(3)

  [13] limit='起始,結(jié)束' 表示限定的記錄范圍,row屬性必須等于"結(jié)束 - 起始",mysql的limit語(yǔ)句是由0起始的,如 “limit 0,5”表示的是取前五筆記錄,“limit 5,5”表示由第五筆記錄起,取下五筆記錄,使用了本屬性后,row屬性將無(wú)效。

  [14] att='數(shù)值' 表示自定義屬性值

  [15] subday='天數(shù)' 表示在多少天以內(nèi)的文檔,通常用于獲取指定天數(shù)的熱門(mén)文檔、推薦文檔、熱門(mén)評(píng)論文檔等

  [16] partsort='排列位數(shù)' 表示自動(dòng)獲得父欄目的所有子數(shù)中排列在第幾位的欄目ID,標(biāo)記為 {dede:autolist}{/dede:autolist} 時(shí),使用本屬性才有效。

  底層模板字段:

  ID(同 id),title,iscommend,color,typeid,ismake,description(同 info),writer,shorttitle,memberid

  pubdate,senddate,arcrank,click,litpic(同 picname),typedir,typename,

  arcurl(同 filename),typeurl,stime(pubdate 的"0000-00-00"格式),

  textlink,typelink,imglink,image

  其中:

textlink = <span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword"><a</span> <span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">href</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'arcurl'</span><span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">></span>title<span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword"></a></span>
typelink = <span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword"><a</span> <span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">href</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'typeurl'</span><span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">></span>typename<span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword"></a></span>
imglink = <span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword"><a</span> <span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">href</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'arcurl'</span><span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">><img</span> <span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">src</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'picname'</span><span class="sh_normal"> </span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">border</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'0'</span><span class="sh_normal"> </span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">width</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'imgwidth'</span><span class="sh_normal"> </span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">height</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'imgheight'</span><span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">></a></span>
image = <span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword"><img</span> <span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">src</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'picname'</span><span class="sh_normal"> </span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">border</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'0'</span><span class="sh_normal"> </span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">width</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'imgwidth'</span><span class="sh_normal"> </span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">height</span><span class="sh_symbol">=</span><span style="color: rgb(0, 0, 255); font-weight: normal; font-style. normal; " class="sh_type">'imgheight'</span><span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">></span> 

  字段調(diào)用方法:[field:varname/]

  如:

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>arclist infolen<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'100'</span><span class="sh_cbracket">}</span>
<span class="sh_symbol">[</span>field<span class="sh_symbol">:</span>textlink<span class="sh_symbol">/]</span>
<span class="sh_symbol"><</span>br<span class="sh_symbol">></span>
<span class="sh_symbol">[</span>field<span class="sh_symbol">:</span>info<span class="sh_symbol">/]</span>
<span class="sh_symbol"><</span>br<span class="sh_symbol">></span>
<span class="sh_cbracket">{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>arclist<span class="sh_cbracket">}</span> 

  注:底層模板里的Field實(shí)現(xiàn)也是織夢(mèng)標(biāo)記的一種形式,因此支持使用PHP語(yǔ)法,F(xiàn)unction擴(kuò)展等功能

  如: 給當(dāng)天發(fā)布的內(nèi)容加上 (new) 標(biāo)志

<span class="sh_symbol">[</span>field<span class="sh_symbol">:</span>senddate runphp<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'yes'</span><span class="sh_symbol">]</span> 
<span style="color: rgb(34, 95, 45); font-weight: normal; font-style. normal; " class="sh_variable">$ntime</span> <span class="sh_symbol">=</span> <span style="color: rgb(0, 0, 0); font-weight: bold; font-style. normal; " class="sh_function">time</span><span class="sh_symbol">();</span>
<span style="color: rgb(34, 95, 45); font-weight: normal; font-style. normal; " class="sh_variable">$oneday</span> <span class="sh_symbol">=</span> <span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_number">3600</span> <span class="sh_symbol">*</span> <span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_number">24</span><span class="sh_symbol">;</span>
<span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">if</span><span class="sh_symbol">((</span><span style="color: rgb(34, 95, 45); font-weight: normal; font-style. normal; " class="sh_variable">$ntime</span> <span class="sh_symbol">-</span> <span style="color: rgb(34, 95, 45); font-weight: normal; font-style. normal; " class="sh_variable">@me</span><span class="sh_symbol">)<</span><span style="color: rgb(34, 95, 45); font-weight: normal; font-style. normal; " class="sh_variable">$oneday</span><span class="sh_symbol">)</span> <span style="color: rgb(34, 95, 45); font-weight: normal; font-style. normal; " class="sh_variable">@me</span> <span class="sh_symbol">=</span> <span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"<font color='red'>(new)</font>"</span><span class="sh_symbol">;</span>
<span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">else</span> <span style="color: rgb(34, 95, 45); font-weight: normal; font-style. normal; " class="sh_variable">@me</span> <span class="sh_symbol">=</span> <span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">""</span><span class="sh_symbol">;</span>
<span class="sh_symbol">[/</span>field<span class="sh_symbol">:</span>senddate<span class="sh_symbol">]</span> 

  --------------------------------------------------------------------------------------

  【field 標(biāo)記】

  功能說(shuō)明:用于獲取特定欄目或檔桉的字段值及常用的環(huán)境變量值

  適用范圍:封面模板、列表模板、文檔模板

  (1)基本語(yǔ)法

  <span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>field name<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'字段名'</span><span class="sh_symbol">/</span><span class="sh_cbracket">}</span>

  (2) 系統(tǒng)分配的field

  板塊模板:phpurl,indexurl,indexname,templeturl,memberurl,powerby,webname,specurl

  列表模板:position,title,phpurl,templeturl,memberurl,powerby,indexurl,indexname,specurl,欄目表dede_arctype的所有字段

  其中 position 為 “欄目一 > 欄目二” 這樣形式的鏈接,title則為這種形式的標(biāo)題

  文檔模板:position,phpurl,templeturl,memberurl,powerby,indexurl,indexname,specurl,id(同 ID,aid)

  (3) 文檔所有內(nèi)容字段

  檔案dede_archives表 和 附加表的所有字段。

  --------------------------------------------------------------------------------------

  【channel 標(biāo)記】

  功能說(shuō)明:用于獲取欄目列表

  適用范圍:封面模板、列表模板、文檔模板

  (1)基本語(yǔ)法

  <span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>channel row<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> type<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span><span class="sh_cbracket">}</span>

  自定義樣式模板(InnerText)

  {/dede:channel}

  (2)屬性

  [1] row='數(shù)字' 表示獲取記錄的條數(shù)(通用在某級(jí)欄目太多的時(shí)候使用,默認(rèn)是 8)

  [2] type = top,sun/son,self

  type='top' 表示頂級(jí)欄目

  type='son' 或 'sun' 表示下級(jí)欄目

  type='self' 表示同級(jí)欄目

  其中后兩個(gè)屬性必須在列表模板中使用。

  (3)底層模板變量

  ID,typename,typedir,typelink(僅表示欄目的網(wǎng)址)

  例:

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>channel type<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'top'</span><span class="sh_cbracket">}</span>
<span class="sh_symbol"><</span>a href<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'[field:typelink /]'</span><span class="sh_symbol">>[</span>field<span class="sh_symbol">:</span>typename<span class="sh_symbol">/]</</span>a<span class="sh_symbol">></span> 
<span class="sh_cbracket">{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>channel<span class="sh_cbracket">}</span> 

  注:在沒(méi)有指定typeid的情況下,type標(biāo)記與模板的環(huán)境有關(guān),如,模板生成到欄目一,那么type='son'就表示欄目一的所有子類

  --------------------------------------------------------------------------------------

  【type 標(biāo)記】別名 onetype

  功能說(shuō)明:表示指定的單個(gè)欄目的鏈接

  適用范圍:封面模板、列表模板、文檔模板

  (1)語(yǔ)法

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>type typeid<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span><span class="sh_cbracket">}{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>type<span class="sh_cbracket">}</span>

  (2)屬性 typeid='欄目ID'

  (3)底層模板變量

  typename,typelink(僅表示欄目的網(wǎng)址)

  --------------------------------------------------------------------------------------

  【autochannel 標(biāo)記】

  功能說(shuō)明:表示指定排序位置的單個(gè)欄目的鏈接

  適用范圍:封面模板、列表模板、文檔模板

  (1)語(yǔ)法

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>autochannel partsort<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span><span class="sh_cbracket">}{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>autochannel<span class="sh_cbracket">}</span>

  (2)屬性 partsort='欄目所在的排序位置'

  (3)底層模板變量

  typename,typelink(僅表示欄目的網(wǎng)址)

  --------------------------------------------------------------------------------------

  【mytag 標(biāo)記】

  功能說(shuō)明:用于獲取自定義宏標(biāo)記的內(nèi)容

  適用范圍:封面模板、列表模板、文檔模板

  (1)基本語(yǔ)法

  <span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>mytag typeid<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> name<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> ismake<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span><span class="sh_symbol">/</span><span class="sh_cbracket">}</span>

  (2)屬性

  [1] typeid = '數(shù)字' 表示欄目ID,默認(rèn)為 0,在沒(méi)有設(shè)定的欄目沒(méi)有定義這個(gè)名稱的標(biāo)記,會(huì)按如下搜索方式來(lái)搜索“先向上查找父欄目 -> 通用標(biāo)記(typeid=0)的同名標(biāo)記”。

  [2] name = '' 標(biāo)記名稱。

  [3] ismake = yes|no 默認(rèn)為 no 表示mytag里的內(nèi)容不包含其它封面模板的標(biāo)記,yes則表示標(biāo)記內(nèi)容含有其它封面模板標(biāo)記。

  --------------------------------------------------------------------------------------

  【vote 標(biāo)記】

  功能說(shuō)明:用于獲取一組投票表單

  適用范圍:封面模板

  (1) 基本語(yǔ)法

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>vote id<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'投票ID'</span> lineheight<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'22'</span>
tablewidth<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'100%'</span> titlebgcolor<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'#EDEDE2'</span>
titlebackground<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> tablebgcolor<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'#FFFFFF'</span><span class="sh_cbracket">}</span>
<span class="sh_cbracket">{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>vote<span class="sh_cbracket">}</span> 

  注:本標(biāo)記直接生成投票的HTML表單,為了讓你更方便修改其樣式,建議在后臺(tái)->投票管理的地方直接復(fù)制生成的HTML代碼來(lái)使用。

  --------------------------------------------------------------------------------------

  【flink 標(biāo)記】,等同 friendlink

  功能說(shuō)明:用于獲取友情鏈接

  適用范圍:封面模板

  (1)基本語(yǔ)法

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>flink type<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> row<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> col<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> titlelen<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> tablestyle<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span><span class="sh_cbracket">}{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>flink<span class="sh_cbracket">}</span>

  (2)屬性

  [1]type:鏈接類型,值:

  a. textall 全部用文字顯示

  b. textimage 文字和圖得混合排列

  c. text 僅顯示不帶Logo的鏈接

  d. image 僅顯示帶Logo的鏈接

  --------------------------------------------------------------------------------------

  [2]row:顯示多少行,默認(rèn)為4行

  [3]col:顯示多少列,默認(rèn)為6列

  [4]titlelen:站點(diǎn)文字的長(zhǎng)度

  [5]tablestyle: 表示  
--------------------------------------------------------------------------------------

  【mynews 標(biāo)記】

  功能說(shuō)明:用于獲取站內(nèi)新聞

  適用范圍:封面模板

  (1) 基本語(yǔ)法

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>mynews row<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'條數(shù)'</span> titlelen<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'標(biāo)題長(zhǎng)度'</span><span class="sh_cbracket">}</span>Innertext<span class="sh_cbracket">{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>mynews<span class="sh_cbracket">}</span>

  (2)屬性

  [1] row 新聞條數(shù)

  [2] titlelen 標(biāo)題長(zhǎng)度

  (3)底層模板變量

  [field:title/]、[field:writer/]、

  [field:senddate function="strftime('%y-%m-%d %H:%M',@me)"/](時(shí)間)、[field:body/]

  --------------------------------------------------------------------------------------

  【loop 標(biāo)記】

  功能說(shuō)明:用于調(diào)用任意表的數(shù)據(jù),一般用于調(diào)用論壇貼子之類的操作

  適用范圍:所有模板

  (1) 基本語(yǔ)法

  <span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>loop table<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">' sort='' row='' if=''}</span>

  底層模板

  {/dede:loop}

  (2) 屬性

  [1] table 表示查詢的數(shù)據(jù)表

  [2] sort 用于排序的字段

  [3] row 返回結(jié)果的條數(shù)

  [4] if 查詢條件

  (3)底層模板變量

  這個(gè)標(biāo)記的底層模板變量即是被查詢表的所有字段

  例:獲取Phpwind論壇的最新主題貼子

 <span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>loop table<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'pw_threads'</span> sort<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'tid'</span> row<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'8'</span> <span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">if</span><span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span><span class="sh_cbracket">}</span>

      •<span class="sh_symbol">[</span>field<span class="sh_symbol">:</span>subject <span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">function</span><span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"cn_substr('@me',30)"</span><span class="sh_symbol">/]</span> 
       <span class="sh_symbol">([</span>field<span class="sh_symbol">:</span>lastpost <span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">function</span><span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"date('m-d H:M','@me')"</span><span class="sh_symbol">/])</span>

     <span class="sh_cbracket">{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>loop<span class="sh_cbracket">}</span>

  --------------------------------------------------------------------------------------

  【channelartlist 標(biāo)記】

  功能說(shuō)明:用于獲取當(dāng)前頻道的下級(jí)欄目的內(nèi)容列表

  適用范圍:封面模板

  (1)基本語(yǔ)法

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>channelArtlist typeid<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_number">0</span> col<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_number">2</span> tablewidth<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'100%'</span><span class="sh_cbracket">}</span>
<span class="sh_symbol"><</span>table width<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"99%"</span> border<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"0"</span> cellpadding<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"3"</span> cellspacing<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"1"</span> bgcolor<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"#BFCFA9"</span><span class="sh_symbol">></span>
<span class="sh_symbol"><</span>tr<span class="sh_symbol">></span>
<span class="sh_symbol"><</span>td bgcolor<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"#E6F2CC"</span><span class="sh_symbol">></span>
<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>type<span class="sh_cbracket">}</span>
<span class="sh_symbol"><</span>table border<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"0"</span> cellpadding<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"0"</span> cellspacing<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"0"</span> width<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"98%"</span><span class="sh_symbol">></span>
<span class="sh_symbol"><</span>tr<span class="sh_symbol">></span>
<span class="sh_symbol"><</span>td width<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'10%'</span> align<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"center"</span><span class="sh_symbol">><</span>img src<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'[field:global name='</span>cfg_plus_dir<span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'/]/img/channellist.gif'</span> width<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'14'</span> height<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'16'</span><span class="sh_symbol">></</span>td<span class="sh_symbol">></span>
<span class="sh_symbol"><</span>td width<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'60%'</span><span class="sh_symbol">></span>
<span class="sh_symbol"><</span>a href<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"[field:typelink /]"</span><span class="sh_symbol">>[</span>field<span class="sh_symbol">:</span>typename <span class="sh_symbol">/]</</span>a<span class="sh_symbol">></span>
<span class="sh_symbol"></</span>td<span class="sh_symbol">></span>
<span class="sh_symbol"><</span>td width<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'30%'</span> align<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'right'</span><span class="sh_symbol">></span>
<span class="sh_symbol"><</span>a href<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"[field:typelink /]"</span><span class="sh_symbol">></span>更多<span class="sh_symbol">...</</span>a<span class="sh_symbol">></span>
<span class="sh_symbol"></</span>td<span class="sh_symbol">></span>
<span class="sh_symbol"></</span>tr<span class="sh_symbol">></span>
<span class="sh_symbol"></</span>table<span class="sh_symbol">></span>
<span class="sh_cbracket">{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>type<span class="sh_cbracket">}</span>
<span class="sh_symbol"></</span>td<span class="sh_symbol">></span>
<span class="sh_symbol"></</span>tr<span class="sh_symbol">></span>
<span class="sh_symbol"><</span>tr<span class="sh_symbol">></span>
<span class="sh_symbol"><</span>td height<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"150"</span> valign<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"top"</span> bgcolor<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"#FFFFFF"</span><span class="sh_symbol">></span>
<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>arclist row<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"8"</span><span class="sh_cbracket">}</span>
•<span class="sh_symbol"><</span>a href<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"[field:arcurl /]"</span><span class="sh_symbol">>[</span>field<span class="sh_symbol">:</span>title <span class="sh_symbol">/]</</span>a<span class="sh_symbol">><</span>br<span class="sh_symbol">></span>
<span class="sh_cbracket">{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>arclist<span class="sh_cbracket">}</span>
<span class="sh_symbol"></</span>td<span class="sh_symbol">></span>
<span class="sh_symbol"></</span>tr<span class="sh_symbol">></span>
<span class="sh_symbol"></</span>table<span class="sh_symbol">></span>
<span class="sh_symbol"><</span>div style<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'font-size:2px'</span><span class="sh_symbol">></span> <span class="sh_symbol"></</span>div<span class="sh_symbol">></span>
<span class="sh_cbracket">{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>channelArtlist<span class="sh_cbracket">}</span> 

  除了宏標(biāo)記外,channelArtlist 是唯一一個(gè)可以直接嵌套其它標(biāo)記的標(biāo)記,不過(guò)僅限于嵌套

  {dede:type}{/dede:type} 和 {dede:arclist}{/dede:arclist} 兩個(gè)標(biāo)記,

電腦資料

DedeCMS標(biāo)簽手冊(cè) 各類標(biāo)簽代碼說(shuō)明》(http://www.szmdbiao.com)。

  (2) 屬性

  [1]typeid=0 頻道ID,默認(rèn)的情況下,嵌套的標(biāo)記使用的是這個(gè)欄目ID的下級(jí)欄目,如果你想用特定的欄目,可以用","分開(kāi)多個(gè)ID。

  [2]col=2 分多列顯示

  [3]tablewidth='100%' 外圍表格的大小

  --------------------------------------------------------------------------------------

  【list 標(biāo)記】

  功能說(shuō)明:表示列表模板里的分頁(yè)內(nèi)容列表

  適用范圍:僅列表模板 list_*.htm

  (1)基本語(yǔ)法

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span><span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">list</span> col<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> titlelen<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> 
infolen<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> imgwidth<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> imgheight<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> orderby<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span> pagesize<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span><span class="sh_cbracket">}{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span><span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">list</span><span class="sh_cbracket">}</span> 

  (2)屬性

  [1]col 內(nèi)容列數(shù)

  [2]titlelen 標(biāo)題長(zhǎng)度

  [3]infolen 內(nèi)容摘要長(zhǎng)度

  [4]imgwidth 縮略圖寬

  [5]imgheight 縮略圖高

  [6]orderby 排序方式,有效的排序方式有 senddate、pubdate、id、click、lastpost、postnum ,默認(rèn)為 sortrank

  [7]pagesize 分頁(yè)大小

  (3)底層模板變量

  ID(同 id),title,iscommend,color,typeid,ismake,description(同 info),postnum,lastpost,shorttitle

  pubdate,senddate,arcrank,click,litpic(同 picname),typedir,typename,

  arcurl(同 filename),typeurl,stime(pubdate 的"0000-00-00"格式),

  textlink,typelink,imglink,image

  注:list標(biāo)記除了支持檔案表的基本模板變量外,還支持附加表的字段,你可以在模型管理中知道附加表支持列表使用的字段有哪些。

  --------------------------------------------------------------------------------------

  【page 標(biāo)記】

  功能說(shuō)明:表示分頁(yè)頁(yè)面的附加參數(shù)

  適用范圍:列表模板

  語(yǔ)法:

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>page pagesize<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"每頁(yè)結(jié)果條數(shù)"</span><span class="sh_symbol">/</span><span class="sh_cbracket">}</span> 

  注:此標(biāo)記在dedecms3.1中已經(jīng)過(guò)期,dedecms3.1中直接把 pagesize屬性加在 list 標(biāo)記中,表示記錄分頁(yè)大小。

  --------------------------------------------------------------------------------------

  【pagelist 標(biāo)記】

  功能說(shuō)明:表示分頁(yè)頁(yè)碼列表

  適用范圍:列表模板

  (1)語(yǔ)法

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>pagelist listsize<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'3'</span> listitem<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">''</span><span class="sh_symbol">/</span><span class="sh_cbracket">}</span> 

  (2)屬性

  [1] listsize 表示 [1][2][3] 這些項(xiàng)的長(zhǎng)度 x 2

  [2] listitem 表示頁(yè)碼樣式,可以把下面的值疊加

  index  首頁(yè)

  pre 上一頁(yè)

  pageno 頁(yè)碼

  next 下一頁(yè)

  end 末頁(yè)

  option 下拉跳轉(zhuǎn)框

  例:

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>pagelist listsize<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'3'</span> listitem<span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">'index pre pageno next end option'</span><span class="sh_symbol">/</span><span class="sh_cbracket">}</span> 

  --------------------------------------------------------------------------------------

  【pagebreak 標(biāo)記】

  功能說(shuō)明:表示文檔的分頁(yè)鏈接列表。

  適用范圍:僅文檔模板。

  語(yǔ)法:{dede:pagebreak/}

  【prenext 標(biāo)記】

  功能說(shuō)明:表示獲取文檔“上一篇/下一篇”的鏈接列表。

  適用范圍:僅文檔模板。

  (1)語(yǔ)法:{dede:prenext/}

  (2)屬性:

  [1] get 獲取連接類型(僅2007版),get='' 同V4顯示橫排的上下頁(yè)連接, get='pre' 上一篇的連接 get='next' 下一篇連接

  注:此標(biāo)記默認(rèn)為橫向排列,如果你想用豎向排列,可以用

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>prenext <span style="color: rgb(165, 42, 42); font-weight: normal; font-style. normal; " class="sh_keyword">function</span><span class="sh_symbol">=</span><span style="color: rgb(255, 0, 255); font-weight: normal; font-style. normal; " class="sh_string">"str_replace('   下一篇:','<'.'br'.' />下一篇:',@me)"</span><span class="sh_symbol">/</span><span class="sh_cbracket">}</span>

  表示

  --------------------------------------------------------------------------------------

  【pagetitle 標(biāo)記】

  功能說(shuō)明:表示獲取文檔的分頁(yè)標(biāo)題

  適用范圍:僅文檔模板。

  (1)語(yǔ)法:{dede:pagetitle style='select'/}

  (2)屬性:style. 表示分頁(yè)標(biāo)題的展示樣式

  select 表示下拉框、link 表示文字直接鏈接

  --------------------------------------------------------------------------------------

  【fieldlist 標(biāo)記】

  功能說(shuō)明:獲得附加表的所有字段信息。

  適用范圍:僅文檔模板。

  語(yǔ)法:

<span class="sh_cbracket">{</span>dede<span class="sh_symbol">:</span>fieldlist<span class="sh_cbracket">}</span>
<span class="sh_symbol">[</span>field<span class="sh_symbol">:</span>name<span class="sh_symbol">/]</span> <span class="sh_symbol">:</span> <span class="sh_symbol">[</span>field<span class="sh_symbol">:</span>value<span class="sh_symbol">/]</span> <span class="sh_symbol"><</span>br<span class="sh_symbol">></span>
<span class="sh_cbracket">{</span><span class="sh_symbol">/</span>dede<span class="sh_symbol">:</span>fieldlist<span class="sh_cbracket">}</span> 

  --------------------------------------------------------------------------------------

  【myad 標(biāo)記】

  功能說(shuō)明:獲取廣告代碼

  適用范圍:所有模板。

  建議在廣告管理模塊中獲取,在此不作描述。

  幫上大家。

  本文來(lái)源熊向陽(yáng)SEO博客

最新文章