织梦dedecms list orderby=weight 按权重排序无效问题 ,找到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'} 。
以上就是织梦list orderby=weight 按权重排序无效问题。我的不幸,恰恰在于我缺乏拒绝的能力。我害怕一旦拒绝别人,便会在彼此心里留下永远无法愈合的裂痕。更多关于织梦list orderby=weight 按权重排序无效问题请关注haodaima.com其它相关文章!