织梦dedecms使用weight排序无效的解决方法


当前第2页 返回上一页

我们再分离一个让list标签支持weight排序:

代码如下:
{dede:list pagesize='10' titlelen='50' orderby='weight'} ?[field:textlink/]<br/> {/dede:list}

解决方法:

1、打开文件arc.listview.class.php

2、查找

代码如下:
else if($orderby=="lastpost") {语句,大概在609行,在此行前面按下回车健,插入如下语句:

代码如下:
else if($orderby=="weight") { $ordersql = " order by arc.weight $orderWay"; }
3、继续查找
代码如下:
if(ereg('hot|click|lastpost',$orderby))语句,修改为:

代码如下:
if(ereg('hot|click|weight|lastpost',$orderby))

修改完成后,保存,如果目标里面已经使用了weight排序,生成一下,就可以看到,文档列表已经安装weight排序

4、模板调用:

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...