需要打开 /include/taglib/arclist.lib.php 找到
else if($orderby == 'rand') $ordersql = " ORDER BY rand()";
在它的下面加入
else if($orderby == 'weight') $ordersql = " order by arc.weight $orderWay";
{dede:arclist typeid='1' row='8' isweight='y' orderby='weight' orderway='asc'}
<li><span>权重:[field:weight /]</span><a href="[field:arcurl /]">[field:title /]</a></li>
{/dede:arclist}
需要打开 /include/arc.listview.class.php 找到
else if($orderby=="lastpost") {
在它的上面加入
else if($orderby == 'weight') {
$ordersql = " ORDER BY arc.weight $orderWay";
}
如图
继续找到
/hot|click|lastpost
改成
/hot|click|lastpost|weight
如图
{dede:list pagesize='10' orderby='weight' orderway='asc'}
<li>
<a href="[field:arcurl/]" class="title">[field:title/]</a>
<p class="intro"> [field:description/]... </p>
</li>
{/dede:list}
提示:权重排序都是以越小值排在越前面
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: 织梦首页/列表页文章按权重排序