无码精品宅男二区在线观看_无码香蕉久综合在线久草观看_久久亚洲三区亚洲热香蕉导航综合_亚洲伊人热一本香蕉天久麻豆熟女老司机乱伦

互聯網知識

精準傳達 ? 價值共享

洞悉互聯網前沿資訊,探尋網站營銷規律

查看其它板塊

織夢首頁/列表頁文章按權重排序

作者:狐靈科技 | 2019-12-17 22:15 |點擊:

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}

提示:權重排序都是以越小值排在越前面

如沒特殊注明,文章均為狐靈科技原創,轉載請注明?? "織夢首頁/列表頁文章按權重排序
多一份免費策劃方案,總有益處。

請直接添加技術總監微信聯系咨詢

網站設計 品牌營銷

多一份參考,總有益處

聯系狐靈科技,免費獲得專屬《策劃方案》及報價

咨詢相關問題或預約面談,可以通過以下方式與我們聯系

業務熱線:15082661954 / 大客戶專線:15523356218