Home > CMS Tutorial > DEDECMS > How to add sorting method to {dede:freelist/}list call

How to add sorting method to {dede:freelist/}list call

藏色散人
Release: 2020-01-08 09:10:40
Original
1695 people have browsed it

How to add sorting method to {dede:freelist/}list call

{dede:freelist/}How to add a sorting method to the list call?

{dede:freelist/}List call to increase the sorting method

Recommended learning:梦Weavercms

How to use the free list tag{ dede:freelist/}I won’t say much here.

When you use the free list, you will find that the sorting method is incomplete. For example, the random sorting "rank" and sorting by score "scores" that I need to use are not available here.

Of course, these two sorting dede exist but are not listed, so it is simple.

Find and open dede/templets/freelist_add.htm "Add Free List Template".

Find

Sort order:

Insert the following code below this line and save:

<option value=”rand”>随机推荐</option> 
<option value=”scores”>按照得分</option>
Copy after login
Copy after login

Find and open dede/templets/freelist_edit.htm "Modify Free List Template".

Find

$orderby = $ctag->GetAtt(‘orderby’);Change the following parameters to the following.

$sorta = "sortrank, top authority value; pubdate, publishing time; senddate, entry time; click, number of clicks; id, document ID, lastpost, last comment time; postnum, total number of comments; rand, random Recommended;scores, according to the score";

then find

<select name=”orderby” id=”orderby” style=”width:120″>
Copy after login

and insert

<option value=”rand”>随机推荐</option> 
<option value=”scores”>按照得分</option>
Copy after login
Copy after login

below to save, exit and verify.

The above is the detailed content of How to add sorting method to {dede:freelist/}list call. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template