DedeCMS让{dede:list pagesize='10'}标签支持weight权重排序
大约609行,查找到并修改为:
//排序方式 $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"; } |
大约654行:
if(ereg('hot|click|lastpost',$orderby))改为
if(ereg('hot|click|lastpost|weight',$orderby)),
模板代码改为:
{dede:list pagesize='10' orderby='weight' orderway="asc"}
就可以了