需要打開 /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>權(quán)重:[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";
}
如圖
繼續(xù)找到
/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}
提示:權(quán)重排序都是以越小值排在越前面
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: 織夢(mèng)首頁/列表頁文章按權(quán)重排序