默认底层模板:

2024-03-01 14:33 小编

imglist :part_imglist.htm

imginfolist :part_imginfolist.htm

arclist :part_arclist.htm

参数:

  • col=' ' 分多少列显示(默认为单列);

TIP

5.3 版中本属性可以通过多种方式进行多行显示

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

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

html
<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}
1
2
3
4
5
6
7

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

其中:

html
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’>
1
2
3
4
5
6
7

注:字段调用方法[field:varname/],同样适用于其他标签

如:

html
{dede:arclist  infolen='100'}	[field:textlink/]<br>	[field:infos/]<br>{/dede:arclist}
1
2
3
4

底层模板里的Field实现也是织梦标记的一种形式,因此支持使用PHP语法,Function扩展等功能。

如: 给当天发布的内容加上 (new) 标志

html
[field:senddate  runphp='yes']	$ntime = time();	$oneday = 3600 *  24;	if(($ntime -  @me)<$oneday) @me = "<font color='red'>(new)</font>";	else @me = "";[/field:senddate]


Tag: 模板
在线咨询 拨打电话

电话

13363039260

内部绝密传真282期

微信二维码