織夢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'} 。
新聞熱點
疑難解答