織夢(mèng)dedecms列表頁(yè)dede:list標(biāo)簽?zāi)J(rèn)的排序方法只有“發(fā)布日期”,“修改日期”,“熱度”這幾種排序方式,今天突發(fā)其想這列表頁(yè)dede:list標(biāo)簽?zāi)懿荒馨错敳葦?shù)來排序呢?
織夢(mèng)dedecms文章列表頁(yè)dede:list標(biāo)簽怎樣按頂踩數(shù)排序
于是開始折騰,其實(shí)方法比較簡(jiǎn)單了,且以下幾個(gè)步驟就能實(shí)現(xiàn)
1、打開/include/arc.listview.class.php文件
找到“//排序方式”下面的:
else {
$ordersql=" ORDER BY arc.sortrank $orderWay";
}
在這個(gè)上面添加
else if($orderby=="goodpost") {
$ordersql = " ORDER BY arc.goodpost $orderWay";
}
找到:
if(preg_match('/hot|click|lastpost/', $orderby))
替換成:
if(preg_match('/hot|click|lastpost|goodpost/', $orderby))