|
功能說明:用于獲取欄目列表 適用范圍:封面模板、列表模板、文檔模板 (1)基本語法 {dede:channel row='' type=''} 自定義樣式模板(InnerText) {/dede:channel} (2)屬性 [1] row='數(shù)字' 表示獲取記錄的條數(shù)(通用在某級欄目太多的時候使用,默認(rèn)是 8) [2] type= top,sun/son,self type='top' 表示頂級欄目 type='son' 或 'sun' 表示下級欄目 type='self' 表示同級欄目 其中后兩個屬性必須在列表模板中使用。 (3)底層模板變量 ID,typename,typedir,typelink(僅表示欄目的網(wǎng)址) 例: {dede:channel type='top'} <a href='[field:typelink /]'>[field:typename/]</a> {/dede:channel} 注:在沒有指定typeid的情況下,type標(biāo)記與模板的環(huán)境有關(guān),如,模板生成到欄目一,那么type='son'就表示欄目一的所有子類 實例: {dede:channel typeid ='18' row='6' type='sun'} <a href="http://www.[field:typeurl/]" target="_blank">[field:typename/]</a>| {/dede:channel}
http://www./這個站首頁部分標(biāo)簽就是通過以上來完成的。
|