dede:list orderby=weight 按权重排序无效问题
2012-09-19 23:25
405 查看
找到list解析文件include/arc.listview.class.php
发现排序规则里面并没有按照weight排序的判断,于是乎修改程序加入排序规则
//排序方式
$ordersql = '';
if($orderby=="senddate" || $orderby=="id") {
$ordersql=" order by arc.id $orderWay";
}
else if($orderby=="hot" || $orderby=="click") {
$ordersql = " order by arc.click $orderWay";
}
else if($orderby=="lastpost") {
$ordersql = " order by arc.lastpost $orderWay";
}
else if($orderby=="weight") {
$ordersql = " order by arc.weight $orderWay";
}
else {
$ordersql=" order by arc.sortrank $orderWay";
}
同时修改条件if(ereg('hot|click|lastpost',$orderby))为if(ereg('hot|click|lastpost|weight',$orderby)), [搜索
hot|click|lastpost 定位]
另外:
arclist 对weight的排序也不准确,需要加上一个isweight的属性
{dede:arclist typeid='32' pagesize='20' isweight='Y' orderby='weight'
orderway='asc'}
发现排序规则里面并没有按照weight排序的判断,于是乎修改程序加入排序规则
//排序方式
$ordersql = '';
if($orderby=="senddate" || $orderby=="id") {
$ordersql=" order by arc.id $orderWay";
}
else if($orderby=="hot" || $orderby=="click") {
$ordersql = " order by arc.click $orderWay";
}
else if($orderby=="lastpost") {
$ordersql = " order by arc.lastpost $orderWay";
}
else if($orderby=="weight") {
$ordersql = " order by arc.weight $orderWay";
}
else {
$ordersql=" order by arc.sortrank $orderWay";
}
同时修改条件if(ereg('hot|click|lastpost',$orderby))为if(ereg('hot|click|lastpost|weight',$orderby)), [搜索
hot|click|lastpost 定位]
另外:
arclist 对weight的排序也不准确,需要加上一个isweight的属性
{dede:arclist typeid='32' pagesize='20' isweight='Y' orderby='weight'
orderway='asc'}
相关文章推荐
- dedecms5.6 按weight排序,{dede:list pagesize='10' orderby='weight'}无效
- DedeCMS让{dede:list}标签支持weight权重排序
- 织梦DedeCms列表{dede:list}标签实现按文章权重weight排序方法
- DedeCMS让{dede:list}标签支持weight权重排序、flag属性
- 织梦DedeCMS让{dede:list}标签支持weight权重排序、flag
- DedeCMS让{dede:list}标签支持weight权重排序、flag属性
- DedeCMS让{dede:list}标签支持weight权重排序、flag属性
- DedeCMS让{dede:list}标签支持weight权重排序
- 织梦权重 arclist orderby=weight新解决办法
- 织梦模板修改{dede:list}标签后,可支持权重排序、flag标签功能
- dede按权重排序无效-BUG-不准,解决办法
- dede织梦技巧:教你彻底解决dede按权重排序的问题
- dede(织梦)从5.5升级到5.6出现的“Unknown column 'weight' in 'field list'”的问题的解决办法
- SQL order by ID desc/asc加一个排序的字段解决查询慢问题
- 解决 联表查询 group by 之后 order by desc 不支持排序问题
- DedeCMS列表页内容根据权重排序dede_arctiny 按weight排序
- MySQL order by 字符串的排序问题
- Sql order by 数据排序 优先级问题
- row_number () over(partition by order by) 在 impala 和 hive 中的对NULL排序的问题
- distinct order by 排序问题