POST TIME:2019-09-29 15:14
(>DedeCMS 3,DedeCMS 4,DedeCMS 5)
名稱:channel
功能:織夢常用標記,通常用于網站頂部以獲取站點欄目信息,方便網站會員分類瀏覽整站信息
語法:
{dede:channel type='top' row='8' currentstyle="<li><a href='~typelink~' class='thisclass'>~typename~</a> </li>"} <li><a href='[field:typelink/]'>[field:typename/]</a> </li> {/dede:channel}文件:
include aglibchannel.lib.php
function lib_channel(&$ctag,&$refObj)
默認底層模板:
channel_list.htm
參數:
typeid = '0'欄目ID
reid = '0'上級欄目ID
row = '100'調用欄目數
col = '1'分多少列顯示(默認為單列)
type = 'son | sun'son表示下級欄目,self表示同級欄目,top頂級欄目
currentstyle = ''應用樣式
底層字段:
ID(同id),typeid, typelink, typename, typeurl,typedir(僅表示欄目的網址)例:
{dede:channel type='top'} <a href='[field:typelink /]'>[field:typename/]</a> {/dede:channel} currentstyle中支持~rel~、~id~、~typelink~、~typename~注:在沒有指定typeid的情況下,type標記與模板的環境有關,如,模板生成到欄目一,那么type='son'就表示欄目一的所有子類