需求:因为要在列表页中要用arclist 标签调用几篇文章放到头部。所以下面的list标签肯定有重复的,所以要用到noflag属性,也就是上面用arclist标签调用的,下面都不要出现。但是我们看下织梦的手册,list标签是不支持这个属性的。
适用范围:仅列表模板 list_*.htm
基本语法:
{dede:list col='' titlelen='' infolen='' imgwidth='' imgheight='' listtype='' orderby=''
pagesize='' orderway=''}{/dede:list}
参数说明:
col='' 内容列数;
titlelen='' 标题长度;
infolen='' 内容摘要长度;
imgwidth='' 缩略图宽;
imgheight='' 缩略图高;
orderby='' 排序方式,有效的排序方式有 senddate、pubdate、id、click、lastpost、postnum ,默认为 sortrank,pagesize='20' 分页大小;
但是我们知道arclist标签是支持这个属性的,然后我们完全可以仿照arclist标签的文件/include/taglib/arclist.lib.php来处理下list标签的那个类文件,也就是/include/arc.listview.class.php。
实现步骤:
1. 要在这个类(/include/arc.listview.class.php)里面定义一下这个变量:在大约45行左右加入这个变量的定义;


弄好,到这里就已经结束,你可以试下在list标签中加上这个试一下是不是好用。
适用范围:仅列表模板 list_*.htm
基本语法:
{dede:list col='' titlelen='' infolen='' imgwidth='' imgheight='' listtype='' orderby=''
pagesize='' orderway=''}{/dede:list}
参数说明:
col='' 内容列数;
titlelen='' 标题长度;
infolen='' 内容摘要长度;
imgwidth='' 缩略图宽;
imgheight='' 缩略图高;
orderby='' 排序方式,有效的排序方式有 senddate、pubdate、id、click、lastpost、postnum ,默认为 sortrank,pagesize='20' 分页大小;
但是我们知道arclist标签是支持这个属性的,然后我们完全可以仿照arclist标签的文件/include/taglib/arclist.lib.php来处理下list标签的那个类文件,也就是/include/arc.listview.class.php。
实现步骤:
1. 要在这个类(/include/arc.listview.class.php)里面定义一下这个变量:在大约45行左右加入这个变量的定义;
这里解释下,知道语法的都知道var 是php4时用来定义的,不写或者用public 都是可以的。
这里我解释下,因为我们填写noflag属性的时候,有时候不止写一个比如noflag='c,h'。所以这里就是分割下然后循环下把这几个属性都加在这个sql语句中。我们知道不管怎么做最后都是要用sql查询 然后return。
弄好,到这里就已经结束,你可以试下在list标签中加上这个试一下是不是好用。