名称:arclist

功能:用于获取系统主从表模型(如:文章、软件、图集、商品等)的一列文档,也称自由列表块标记,其中imglist、imginfolist、specart、coolart、autolist都是由该标记所定义的不同属性延伸出来的别名标记。

语法:

1 dede:arclist  flag='h' typeid='' row='' col='' titlelen='' infolen='' imgwidth='' imgheight='' listtype='' orderby='' keyword='' limit='0,1'}
2   
3 <a href='[field:arcurl/]'>[field:title/]</a>
4   
5 {/dede:arclist}

文件:

\include\taglib\arclist.lib.php 

function lib_arclist(&$ctag,&$refObj)

默认底层模板:

imglist:part_imglist.htm

imginfolist:part_imginfolist.htm

arclist:part_arclist.htm

参数:

col='' 分多少列显示(默认为单列),5.3版中本属性可以通过多种方式进行多行显示

如果col='1'要多列显示的可用div+css实现

以下为通过div+css实现多列的范例:

01 <style type=text/css>
02   
03 div{width:400px;float:left;}
04   
05 </style>
06   
07 {dede:arclist row='10' titlelen='24' orderby='pubdate' idlist='' col='2'}
08   
09 [field:textlink/]([field:pubdate function=MyDate('m-d',@me)/])<br/>
10   
11 {/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' 文档排序方式

l         orderby='hot' 或orderby='click' 表示按点击数排列

l         orderby='sortrank' 或orderby='pubdate' 按出版时间排列

l         orderby='near'

l         orderby=='lastpost' 按最后评论时间

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

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

l         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='天数' 表示在多少天以内的文档

底层字段:

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"格式)

其中:

01 textlink = <a href='arcurl'>title</a>
02   
03 typelink = <a href='typeurl'>typename</a>
04   
05 imglink=<a href='arcurl'><img src='picname' border='0' width='imgwidth' height='imgheight'></a>
06   
07 image = <img src='picname' border='0' width='imgwidth' height='imgheight' target='_blank'><u>织梦</u>标记的一种形式,因此支持使用<a href="http://www.86669999.org" title="织梦模板"><u>PHP</u></a>语法,Function扩展等功能。<p></p><p style="border-bottom:medium none;border-left:medium none;padding-bottom:0cm;line-height:150%;padding-left:0cm;padding-right:0cm;border-top:medium none;border-right:medium none;padding-top:0cm">如: 给当天发布的内容加上 <span style="color:red">(new)</span> 标志</p><pre class="brush:as3;toolbar:false;">[field:senddate runphp='yes']
08   
09 $ntime = time();
10   
11 $oneday = 3600 * 24;
12   
13 if(($ntime - @me)<$oneday) @me = "<font color='red'>(new)</font>";
14   
15 else @me = "";
16   
17 [/field:senddate]</pre><p style="border-bottom:medium none;border-left:medium none;padding-bottom:0cm;line-height:150%;padding-left:0cm;padding-right:0cm;border-top:medium none;border-right:medium none;padding-top:0cm"><br></p><p><br></p>
18 <div></div>

THE END

本站部分文章搜集整理于互联网或者网友提供,如有侵权请联系站长

如若转载,请注明出处:https://www.htmlbk.com/dedecms/455.html

温馨提示:该文档最后一次修改时间为2020-03-19 14:11:31,请注意相关的内容是否还可用!