演示链接:查看演示

dedecmsdedecms文章按权重排序

dede:arclist 这个标签官方程序是支持按权重调用文章的,正确的标签写法是这样的

 

{dede:arclist typeid='1' row='8' isweight='y'} <li><span>权重:[field:weight /]</span><a href="[field:arcurl /]">[field:title /]</a></li> {/dede:arclist}
 

列表要按权重排序的话,需要打开 \\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"; }
 

继续找到

 

/hot|click|lastpost

改成

 

/hot|click|lastpost|weight

 

THE END
喜欢就支持一下吧
点赞0 分享