首页 > CMS > 织梦DEDE > 正文

dedecms文章列表页dede:list标签怎样按顶踩数排序

2024-07-12 08:32:54
字体:
来源:转载
供稿:网友
织梦dedecms列表页dede:list标签默认的排序方法只有“发布日期”,“修改日期”,“热度”这几种排序方式,今天突发其想这列表页dede:list标签能不能按顶踩数来排序呢? 织梦dedecms文章列表页dede:list标签怎样按顶踩数排序 于是开始折腾,其实方法比较简单了,且以下几个步骤就能实现 1、打开/include/arc.listview.class.php文件 找到“//排序方式”下面的:         else {             $ordersql=" ORDER BY arc.sortrank $orderWay";         } 在这个上面添加         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))
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表