<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:arclist标签按自定义字段排序orderby怎么修改

时间:2020-12-21

如果我们使用织梦建站,但是不想使用他默认的几种排列方式,怎么办?默认的排列方式有下面几种:{dede:arclist orderby='排序字段' }

{/dede:arclist}
orderby='sortrank' 文档排序方式
§ orderby='hot' 或 orderby='click' 表示按点击数排列
§ orderby='sortrank' 或 orderby='pubdate' 按出版时间排列
§ orderby='near'
§ orderby=='lastpost' 按最后评论时间
§ orderby=='scores' 按得分排序
§ orderby='id' 按文章ID排序
§ orderby='rand' 随机获得指定条件的文档列表

实现前面的假设:能按照自定义的字段排序,假如我现在在dede_archives表里面添加了一个字段NewField,
我想按照这个字段排序。直接这样写:{dede:arclist orderby='NewField' }是不行的。那应该怎样修改?
修改文件include/arc.listview.class.php,参考附件arc.listview.class.php(版本5.5utf8),修改如下:
1、在第560行至562行处添加如下代码:
else if($orderby=="NewField") {
$ordersql = " order by arc.NewField $orderWay";
}

2、修改603行代码,仿站修改如下:
if(ereg('hot|click|lastpost|NewField',$orderby))

0
首页
案例
关于
联系