国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 織夢DEDE > 正文

dedecms全局標(biāo)簽:arclist 文檔列表

2024-07-12 07:51:46
字體:
供稿:網(wǎng)友

arclist 文檔列表

dedecms > 3.0DedeCMS 4DedeCMS 5

名稱:arclist

功能:用于獲取系統(tǒng)主從表模型(如:文章、軟件、圖集、商品等)的一列文檔,也稱自由列表塊標(biāo)記,其中imglistimginfolistspecartcoolartautolist都是由該標(biāo)記所定義的不同屬性延伸出來的別名標(biāo)記。

語法:

{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

function lib_arclist(&$ctag,&$refObj)

默認(rèn)底層模板:

imglistpart_imglist.htm

imginfolistpart_imginfolist.htm

arclistpart_arclist.htm

參數(shù):

col='' 分多少列顯示(默認(rèn)為單列),5.3版中本屬性可以通過多種方式進(jìn)行多行顯示

如果col='1'要多列顯示的可用div+css實(shí)現(xiàn)

以下為通過div+css實(shí)現(xiàn)多列的范例:

<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}

當(dāng)col>1將使用原來的table多列方式顯示

row='10' 返回文檔列表總數(shù)

typeid='' 欄目ID,在列表模板和檔案模板中一般不需要指定,在首頁模板中允許用","分開表示多個(gè)欄目;

getall='1' 在沒有指定這屬性的情況下,在欄目頁、文章頁模板,不會(huì)獲取以","分開的多個(gè)欄目的下級子類

titlelen = '30' 標(biāo)題長度 等同于titlelength

infolen='160' 表示內(nèi)容簡介長度 等同于infolength(只控制infos,并不控制description的內(nèi)容)

imgwidth='120' 縮略圖寬度

imgheight='90' 縮略圖高度

listtype='all' 欄目類型 image含有縮略圖 commend推薦

orderby='sortrank' 文檔排序方式

l         orderby='hot'  orderby='click' 表示按點(diǎn)擊數(shù)排列

l         orderby='sortrank'  orderby='pubdate' 按出版時(shí)間排列

l         orderby='near'

l         orderby=='lastpost' 按最后評論時(shí)間

l         orderby=='scores' 按得分排序

l         orderby='id' 按文章ID排序

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

keyword='' 含有指定關(guān)鍵字的文檔列表,多個(gè)關(guān)鍵字用","

innertext = '' 單條記錄樣式

aid='' 指定文檔ID

idlist ='' 提取特定文檔(文檔ID

channelid 頻道ID

limit='起始ID,記錄數(shù)(起始ID0開始)表示限定的記錄范圍(如:limit='1,2'  表示從ID1的記錄開始,取2條記錄)

flag = 'h' 自定義屬性值:頭條[h]推薦[c]圖片[p]幻燈[f]滾動(dòng)[s]跳轉(zhuǎn)[j]圖文[a]加粗[b]

noflag = '' flag,但這里是表示不包含這些屬性

orderway='desc' 值為 desc  asc ,指定排序方式是降序還是順向排序,默認(rèn)為降序

subday='天數(shù)' 表示在多少天以內(nèi)的文檔

底層字段:

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>

 

注:字段調(diào)用方法[field:varname/],同樣適用于其他標(biāo)簽

如:

{dede:arclist infolen='100'}

[field:textlink/]

<br>

[field:infos/]

<br>

{/dede:arclist}

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

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

[field:senddate runphp='yes']

$ntime = time();

$oneday = 3600 * 24;

if(($ntime - @me)<$oneday) @me = "<font color='red'>(new)</font>";

else @me = "";

[/field:senddate]


發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 乌兰县| 五家渠市| 哈尔滨市| 长岛县| 沧源| 吉安县| 宿松县| 五原县| 建平县| 舟曲县| 临朐县| 谢通门县| 镇沅| 松潘县| 临西县| 通江县| 保德县| 十堰市| 巧家县| 金平| 南川市| 宝兴县| 色达县| 井研县| 红原县| 五台县| 澎湖县| 康马县| 饶平县| 阜宁县| 乐都县| 射洪县| 香港 | 方城县| 耿马| 襄汾县| 广灵县| 枞阳县| 伊吾县| 台中县| 夹江县|