In website operation, the display method of the article list directly affects user experience and content reach efficiency.A well-organized list of articles that highlights the key points, which can significantly improve user retention and information acquisition efficiency.AnQiCMS as a flexible content management system, provides powerful article list display functions, which can not only flexibly filter content, but also freely adjust the sorting method of articles according to your content strategy, making your website content more attractive.

Core Function: Dynamic Sorting of Article List

AnQiCMS through its corearchiveListTemplate tags provide us with great flexibility to control the display of articles.This tag is not only responsible for content output but also the key to content sorting.Next, we will discuss how to use this tag to adjust the display order of articles according to different operational needs.

1. Sort by views: Popular content is easily presented

To let users quickly find popular content on the website, sorting articles by view count (Views) is an excellent choice.When a piece of content receives more attention, it can effectively attract new visitors and enhance the overall activity of the website.archiveListtags, you just need to set them simplyorderthe parameter. For example,order="views desc"This article will be arranged according to the number of views from high to low. This means that your articles with the highest user engagement will be displayed first to the visitors, bringing continuous traffic to the website.

{# 显示浏览量最高的10篇文章 #}
{% archiveList archives with type="page" order="views desc" limit="10" %}
    {% for item in archives %}
        <div class="article-item">
            <h3><a href="{{ item.Link }}">{{ item.Title }}</a></h3>
            <p>浏览量: {{ item.Views }}</p>
            <p>{{ item.Description }}</p>
        </div>
    {% endfor %}
{% endarchiveList %}

This setting can help you quickly build a 'Hot Articles' or 'Leaderboard' area, ensuring that your premium content receives the exposure it deserves and effectively guides users to explore more exciting content.

二、By release time sorting: The latest dynamic is clear at a glance

For news updates, industry information, or regularly updated blog content, sorting by publication time is the standard way to ensure users receive the latest information. AnQiCMS articles will always have aCreatedTimeField records, the system will usually sort by this time in reverse order (i.e., the most recently published at the top). InarchiveListIn the tags, you can go throughorder="id desc"To implement the latest released articles to be displayed first, because the article ID usually increases with the release time.

{# 显示最新发布的10篇文章 #}
{% archiveList archives with type="page" order="id desc" limit="10" %}
    {% for item in archives %}
        <div class="article-item">
            <h3><a href="{{ item.Link }}">{{ item.Title }}</a></h3>
            <p>发布时间: {{ stampToDate(item.CreatedTime, "2006-01-02 15:04") }}</p>
            <p>{{ item.Description }}</p>
        </div>
    {% endfor %}
{% endarchiveList %}

You can also make use of the 'Scheduled Post' feature when publishing an article, preset the future publish time, and the system will automatically include it in the latest article list at the specified time. Combined withstampToDateLabel, you can flexibly useCreatedTimeFormatted to any date and time display you need, ensuring that the timeliness of the content is perfectly presented.

English, Three, Operation by background custom sorting: A tool for refined operation.

In addition to the automated sorting rules, AnQiCMS also allows you to manually intervene in the order of the article list, which is particularly useful for content recommendation, special topic planning, or highlighting key content.In the article editing interface, there is usually a field called "display order".order="sort desc"Parameters, AnQiCMS will display the articles strictly according to the order you set.orderParameter is left blank, the system will also default to the custom sorting in the background, which means you can manage the display priority of articles in the background without changing the template code.

{# 显示后台自定义排序的前10篇文章 #}
{% archiveList archives with type="page" order="sort desc" limit="10" %}
    {% for item in archives %}
        <div class="article-item">
            <h3><a href="{{ item.Link }}">{{ item.Title }}</a></h3>
            <p>文章概要: {{ item.Description }}</p>
            {# 这里的排序受后台文章编辑界面的“显示顺序”字段控制 #}
        </div>
    {% endfor %}
{% endarchiveList %}

This custom sorting feature gives you absolute control over how content is presented, allowing you to prioritize the most important information for users based on operational strategies. Whether it's new product launches, important announcements, or featured content, they can all receive precise exposure.

Certainly, you can combine these sorting methods with

Certainly, you can combine these sorting methods witharchiveListTags and other powerful parameters combined to create more targeted article lists. For example, bycategoryIdspecifying articles in a particular category or usingflagFilter content with attributes such as "RecommendedThis combination ability allows your content display strategy to be more flexible, accurately meet the needs of different pages and user groups, and achieve better operational results.