dede列表标签list:应用大全 {dede:list}

http://syizq.blog.163.com/blog/static/435700372011616115826329/
标签名称: list 功能说明: 表示列表模板里的分页内容列表 适用范围: 仅列表模板 list_*.htm 基本语法: {dede:list col='' titlelen='' infolen='' imgwidth='' imgheight='' listtype='' orderby='' pagesize='' orderway=''}{/dede:list} 相关函数: 文
标签名称:list
功能说明:表示列表模板里的分页内容列表
适用范围:仅列表模板 list_*.htm
基本语法:
{dede:list col='' titlelen='' infolen='' imgwidth='' imgheight='' listtype='' orderby='' pagesize='' orderway=''}{/dede:list}
相关函数:
文件includearc.listview.class.php第504行
//获得一个单列的文档列表
function GetArcList($limitstart=0,$row=10,$col=1,$titlelen=30,$infolen=250,
$imgwidth=120,$imgheight=90,$listtype="all",$orderby="default",$innertext="",$tablewidth="100",$ismake=1,$orderWay='desc')
参数说明:
col='' 内容列数
titlelen='' 标题长度
infolen='' 内容摘要长度
imgwidth='' 缩略图宽
imgheight='' 缩略图高
orderby='' 排序方式,有效的排序方式有 senddate、pubdate、id、click、lastpost、postnum ,默认为 sortrank
pagesize='20' 分页大小
底层模板字段:
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"格式)
注:list标记除了支持档案表的基本模板变量外,还支持附加表的字段,你可以在模型管理中知道附加表支持列表使用的字段有哪些。
使用实例:
这个标签是系统常用标签,通常用于显示列表内容,我们可以在系统的list_*.htm这类模板文件中看到这个标签,我们以list_article.htm为例:
{dede:list pagesize='10'}

  • [field:array runphp='yes']@me = (empty(@me['litpic']) ? "" : "dede列表标签list:应用大全 <wbr>{dede:list}"); [/field:array]
    [field:title/]

    日期:[field:pubdate function="GetDateTimeMK(@me)"/]
    点击:[field:click/]
    好评:[field:scores/]


    [field:description/]...



  • {/dede:list}
    我们查看默认页面显示效果:

    这个标签是同pagelist标签配合使用的,用于显示完整的列表分页效果。
    列表标签中如果需要显示附加字段,需要在系统后台[核心]-[内容模型管理],编辑一个内容模型(这里以软件为例),在“列表附加字段”加入相应字段即可。

    如果需要修改列表显示的核心代码,可以查看includearc.listview.class.php的相关内容。
原文地址:https://www.cnblogs.com/lxwphp/p/7731187.html