<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

织梦 {dede:list}列表按多种排序显示

时间:2020-12-15

orderby='sortrank' 文档排序方式

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

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

orderby='near'

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

orderby=='scores' 按得分排序

orderby='id' 按文章ID排序

orderby='rand' 随机获得指定条件的文档列表

orderby='scores' 按评论来排序 官方没有写的

倒序 orderway='asc'

orderway是设置排序的方式,值为desc和asc

 

dedecms列表页实现文档按权重weight排序(从小到大的顺序)方法:

1,在list_artcile.htm模板中使用

{dede:list pagesize='12′ orderby='weight' orderway='asc'}

2,然后修改include目录下的arc.listview.class.php

查找else if($orderby=="lastpost。。。

在下面补充

else if($orderby=="weight") { $ordersql = " order by arc.weight $orderWay"; }

3,同样是这个文件,查找“if(ereg(‘hot|click|lastpost',$orderby))”改为:

if(ereg(‘hot|click|weight|lastpost',$orderby))

上面三个步骤,即可实现列表页内容按权重排序,越小越靠前。dedecms v5.7SP1 测试成功!

0
首页
案例
关于
联系