主頁(yè) > 網(wǎng)站建設(shè) > 建站知識(shí) > dede:list orderby=weight 按權(quán)重排序無(wú)效問(wèn)題

dede:list orderby=weight 按權(quán)重排序無(wú)效問(wèn)題

POST TIME:2017-11-13 00:13

找到list解析文件include/arc.listview.class.php

發(fā)現(xiàn)排序規(guī)則里面并沒(méi)有按照weight排序的判斷,于是乎修改程序加入排序規(guī)則

//排序方式
$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";
}
同時(shí)修改條件if(ereg('hot|click|lastpost',$orderby))為if(ereg('hot|click|lastpost|weight',$orderby)), [搜索hot|click|lastpost 定位]

另外:

arclist 對(duì)weight的排序也不準(zhǔn)確,需要加上一個(gè)isweight的屬性

{dede:arclist typeid='32' pagesize='20'isweight='Y' orderby='weight'orderway='asc'}



上一篇:dede在channel標(biāo)簽的currentstyle中使用全局變量

下一篇:織夢(mèng)channel標(biāo)簽currentstyle樣式無(wú)效不起作用

收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266