标签:写法 技术分享 打开 script typeid htm tle and glib
需要打开 /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}
提示:权重排序都是以越小值排在越前面
标签:写法 技术分享 打开 script typeid htm tle and glib
原文地址:https://www.cnblogs.com/dedevip/p/9913333.html