方法:
1 | 打开include/taglib/channelartlist.lib.php,找到大约78行,把
$dsql->SetQuery(“SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath FROM `dede_arctype` WHERE $tpsql ORDER BY sortrank ASC LIMIT $totalnum”);
修改为:
$dsql->SetQuery(“SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath FROM `dede_arctype` WHERE $tpsql ORDER BY substring_index(‘$typeid’,id,1) LIMIT $totalnum”);
2 | 前台调用标签:
{dede:channelartlist typeid='1,2,3,4,5,6'} {dede:type}
根据栏目的ID排序,想要什么样的排序更改ID的先后顺序就好了