織夢dede首頁文章列表arclist按照'weight'權重由小
導讀:DEDE技術DEDE技術您當前位置:模板超市 建站教程 模板使用教程 織夢dede首頁文章列表arclist按照'weight'權重由小到大排序 時間:2011-12-03 12:04免費織夢模板模板織夢。
織夢默認情況下是沒有開啟weight排序的需要修改arclist.lib.php
1、 在織夢系統中找到以下目錄\include\taglib中的arclist.lib.php文件并打開
大約在74 、75行找到:
&ndede模板安裝bsp; // arclist是否需要weight排序,默認為"N",如果需要排序則設置為"Y" $isweight = $ctag->GetAtt('isweight');
把這行修改為:
$weight = $ctag->GetAtt('weight');
2、
大約在327行找到
//文檔排序的方式 $ordersql = ''; if($orderby=='hot' || $orderby=='click') $ordersql 模板織夢= " ORDER BY arc.click $orderWay"; else if($orderby == 'sortrank' || $orderby=='pubdate') $ordersql = " ORDER BY arc.sortrank $orderWay"; else if($orderby == 'id') $ordersql = " ORDER BY arc.id $orderWay"; else if($orderby == 'near') $ordersql = " ORDER BY ABS(arc.id - ".$arcid.")"; else if($orderby == 'lastpost') $ordersql = " ORDER BY arc.lastpost $orderWay"; &nbdede下瓻模板下載sp; else if($orderby == 'scores') $ordersql = " ORDER BY arc.scores $orderWay"; else if($orderby == 'rand') $ordersql = " ORDER BY rand()";
else if($orderby == 'weight') $ordersql = " order by arc.weight asc";//在這里增加一行---->如果沒有特定設置排序則按照權重先排序 else $ordersql = " ORDER BY arc.sortrank $orderWay";
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-20 ,文章織夢dede首頁文章列表arclist按照'weight'權重由小主要講述權重,首頁,織夢網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_31826.html