织梦dedeCMS让{dede:list}标签支持weight权重排序

修改\include\arc.listview.class.php在文件第727行处添加按weight排序判断代码:

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

第778行处找到此段代码(如果不用默认的sortrank或id排序,使用联合查询(数据量大时非常缓慢)):
if(preg_match('/hot|click|lastpost|weight/', $orderby))

标签调用:
{dede:list isweight='Y' orderby='weight' orderway='asc'}

Tags: 织梦