How dede sorts by ID
dedeHow to sort by ID?
dede sorting problem: How to sort by the ID you wrote and change the function. It can be easily implemented. There is a specific example below. You can refer to the following
Recommended learning: 梦Weavercms
Change the function and implement the sorting method according to your own writing Sort by ID just fine.
Method:
1. Open include/taglib/channelartlist.lib.php, find about 78 lines, and modify the
code as follows:
$dsql->SetQuery("SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath FROM `dede_arctype` WHERE $tpsql ORDER BY sortrank ASC LIMIT $totalnum");
For:
The code is as follows:
$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. Front desk call tag:
The code is as follows:
{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}
Sort according to the ID of the column, what do you want? Just change the order of IDs,
The above is the detailed content of How dede sorts by ID. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

