# arclist|文檔列表
**標簽名稱**:arclist
**標記簡介**:織夢常用標記,也稱為自由列表標記,其中imglist、imginfolist、specart、coolart、autolist都是由該標記所定義的不同屬性延伸出來的別名標記。
**功能說明**:獲取指定文檔列表
**適用范圍**:全局使用
**基本語法**:
{dede:arclist? flag='h' typeid='' row='' col='' titlelen='' infolen='' imgwidth='' imgheight='' listtype='' orderby='' keyword='' limit='0,1'}
<a href='[field:arcurl/]'>[field:title/]</a>
{/dede:arclist}
**相關函數:**
文件\include\taglib\arclist.lib.php第7行
function lib_arclist(&$ctag,&$refObj)
**參數說明**:
**col**='' 分多少列顯示(默認為單列),5.3版中本屬性可以通過多種方式進行多行顯示
如果col='1'要多列顯示的可用div+css實現
以下為通過div+css實現多列的示例:
<style type=text/css>
div{width:400px;float:left;}
</style>
{dede:arclist row='10' titlelen='24' orderby='pubdate' idlist='' col='2'}
?[field:textlink/]([field:pubdate function=MyDate('m-d',@me)/])<br/>
{/dede:arclist}
當col>1將使用原來的table多列方式顯示
**row**='10' 返回文檔列表總數
**typeid**='' 欄目ID,在列表模板和檔案模板中一般不需要指定,在首頁模板中允許用","分開表示多個欄目;
**getall**='1' 在沒有指定這屬性的情況下,在欄目頁、文章頁模板,不會獲取以","分開的多個欄目的下級子類
**titlelen** = '30' 標題長度 等同于titlelength
**infolen**='160' 表示內容簡介長度 等同于infolength(只控制infos,并不控制description的內容)
**imgwidth**='120' 縮略圖寬度
**imgheight**='90' 縮略圖高度
**listtype**='all' 欄目類型 image含有縮略圖 commend推薦
**orderby**='sortrank' 文檔排序方式
§ orderby='hot' 或 orderby='click' 表示按點擊數排列
§ orderby='sortrank' 或 orderby='pubdate' 按出版時間排列
§ orderby='near'
§ orderby=='lastpost' 按最后評論時間
§ orderby=='scores' 按得分排序
§ orderby='id' 按文章ID排序
§ orderby='rand' 隨機獲得指定條件的文檔列表
**keyword**='' 含有指定關鍵字的文檔列表,多個關鍵字用","分
**innertext** = '' 單條記錄樣式
**aid**='' 指定文檔ID
**idlist** ='' 提取特定文檔(文檔ID)
**channelid** 頻道ID
**limit**='起始ID,記錄數'? (起始ID從0開始)表示限定的記錄范圍(如:limit='1,2'? 表示從ID為1的記錄開始,取2條記錄)
**flag** = 'h' 自定義屬性值:頭條[h]推薦[c]圖片[p]幻燈[f]滾動[s]跳轉[j]圖文[a]加粗[b]
**noflag** = '' 同flag,但這里是表示不包含這些屬性
**orderway**='desc' 值為 desc 或 asc ,指定排序方式是降序還是順向排序,默認為降序
**subday**='天數' 表示在多少天以內的文檔
用arclist調用于附加表字段的方法:
要獲取附加表內容,必須符合兩個條件
1、指定 channelid 屬性
2、指定要獲得的字段 addfields='字段1,字段'
如:
{dede:arclist addfields='filetype,language,softtype' row='8' channelid='3'}
[field:textlink /] - [field:softtype /]<br />
{/dede:arclist}

**底層模板字段**:
ID(同 id),typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,
source,litpic(同picname),pubdate,senddate,mid, lastpost,scores,goodpost,badpost,notpost,
description(同infos),filename, image, imglink, fulltitle, textlink, typelink,plusurl, memberurl, templeturl,
stime(pubdate 的"0000-00-00"格式)
其中:
textlink = <a href='arcurl'>title</a>
typelink = <a href='typeurl'>typename</a>
imglink = <a href='arcurl'><img src='picname' border='0' width='imgwidth' height='imgheight'></a>
image = <img src='picname' border='0' width='imgwidth' height='imgheight' alt=’titile’>
**字段調用方法**:[field:varname/]
如:
{dede:arclist infolen='100'}
[field:textlink/]
<br>
[field:infos/]
<br>
{/dede:arclist}
注:底層模板里的Field實現也是織夢標記的一種形式,因此支持使用PHP語法,Function擴展等功能。
如: 給當天發布的內容加上 (new) 標志
[field:senddate runphp='yes']
$ntime = time();
$oneday = 3600 * 24;
if(($ntime - @me)<$oneday) @me = "<font color='red'>(new)</font>";
else @me = "";
[/field:senddate]
- 全局標簽
- adminname|責任編輯
- arclist|文檔列表
- arclistsg|獨立單表模型列表
- channel|頻道標簽
- channelartlist|頻道文檔
- feedback|會員評論內容
- field|常用變量
- fieldlist|變量列表
- hotwords|熱門關鍵詞
- infoguide|分類信息搜索
- autochannel|指定欄目
- type|指定欄目
- tag|TAG調用
- sql|SQL標簽
- sonchannel|子欄目標簽
- loop|萬能循環
- mytag|自定義宏標記
- memberlist|會員信息列表
- memberinfos|用戶信息
- 模塊標記
- myad|廣告標簽
- mynews|站內新聞
- vote|投票標簽
- ask|問答標簽
- groupthread|圈子主題
- group|圈子標簽
- booklist|連載圖書
- bookcontentlist|連載內容
- 列表專用
- pagelist|列表分頁
- list|列表標簽
- 文檔頁專用
- likearticle|相關文檔
- softmsg|下載說明
- pagetitle|分頁標題
- pagenext|上下篇標簽
- pagebreak|內容分頁
- PHP混編
- likesgpagelikepage|單頁文檔調用