- dede:arclist 按权重排序输出文章
需要打开 /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 按权重排序的标签写法
{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}
- dede:list 按权重排序输出文章
需要打开 /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 按权重排序的标签写法
{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}
提示:权重排序都是以越小值排在越前面