dedecms文章列表頁list如何實現按權重排序呢?
方法如下:
1、在include下面找到arc.listview.class.php打開
在
else if($orderby=="lastpost") {
$ordersql = " ORDER BY arc.lastpost $orderWay";
}
的下面添加如下代碼:
else if($orderby == "weight") {
$ordersql = " order by arc.weight $orderWay";
}
2、在if(preg_match('/hot|click|lastpost/', $orderby))的代碼替換為
if(preg_match('/hot|click|lastpost|weight/', $orderby))
3、調用使用orderby='weight'和orderway='desc'(權重數字越大越靠前)或orderway='asc'(權重數字越小越靠前) 搭配,如:
{dede:list pagesize='9' orderby='weight' orderway='desc'}
以上就是關于【織夢list列表文章按權重排序的方法】的文章內容,如果您還想了解更多關于網站建設與網絡推廣的相關文章,請繼續查看【織夢教程】欄目的其它文章
來源theround.com.cn廣州明行威,致力于中小企業網絡營銷推廣、整體外包運營(網站建設、SEM、SEO等)、企業SEO內訓、信息流廣告運營
歡迎交流 加微信13430336474 廣州張楷

上一篇:織夢中英文分頁上一篇下一篇位置的翻譯方法 下一篇:織夢文章內容頁利用添加tags標簽來做SEO優化