<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

dede如何按自己写的ID进行排序

时间:2020-12-21

更改一下函数,实现排序方式根据自己写的ID排序就好了。 
方法: 
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} 
<li><a href='[field:typeurl/]' [field:rel/]>[field:typename/]</a></li> 
{/dede:type} 
{/dede:channelartlist} 

根据栏目的ID排序,想要什么样的排序更改ID的先后顺序就好了,
0
首页
案例
关于
联系