What ways does AnQiCMS support for sorting the article list display, such as by views or publication time?

Calendar 👁️ 68

The display order of the website content list is one of the key factors that affect user experience and content operation effectiveness.An excellent CMS system should provide a flexible sorting mechanism, allowing operators to freely adjust the presentation of articles based on content characteristics and promotional strategies.Our CMS is well-versed in this, providing users with various ways to sort article lists to help you accurately control content exposure and traffic direction.

Core sorting function: archiveListThe powerful application of tags

In Anqi CMS, the sorting of article lists is mainly through the template in thearchiveListThe tag to implement. This tag is the core of content display, it can not only help us retrieve articles under different conditions, but also through itsorderParameters, for precise sorting control of the retrieved content.

  • Sorted by publication time (id desc):This is the most common and intuitive sorting method. In Anqi CMS, you can set uporder="id desc"To implement the latest released articles to be displayed at the top. The system assigns a unique ID to each article, usually, the larger the ID, the later the publication time of the article.Therefore, by arranging in descending order by ID, it can easily present the 'Latest Articles' list, ensuring that users can always see the freshest content.If you want to sort by publication time from old to new, you can useid asc.

  • Sort by view count(views desc):For websites that want to highlight popular content and attract more attention, sorting by view count is undoubtedly**the choice. Anqi CMS supportsorder="views desc"Let those popular articles automatically rise to the top of the list.This sorting method can effectively utilize the "Matthew effect" to recommend high-quality and popular content on the website to more visitors, enhancing the overall activity and value of the content. Conversely,views ascIt will display the article with the least views.

  • custom sorting by backend (sort desc):In addition to the automatic sorting rules generated by the system, AnQi CMS also provides high flexibility, allowing you to manually sort articles in the background. Once you have set the custom sorting value for articles in the background management interface, you canorder="sort desc"(orsort ascThis approach is especially suitable for scenarios where manual adjustment of the order is required to prioritize content or for thematic recommendations or key promotions.

How to apply sorting rules in the template

The settings of these sorting rules are very intuitive, they act asarchiveListThe label parameters can be directly configured in your template file. For example, if you want to display the latest 10 articles in an article list area, the template code may be similar to:

{% archiveList archives with type="list" limit="10" order="id desc" %}
    {% for item in archives %}
        <li><a href="{{item.Link}}">{{item.Title}}</a> - {{stampToDate(item.CreatedTime, "2006-01-02")}}</li>
    {% endfor %}
{% endarchiveList %}

If you want to display the top 5 articles with the highest views, you can write it like this:

{% archiveList hotArchives with type="list" limit="5" order="views desc" %}
    {% for item in hotArchives %}
        <li><a href="{{item.Link}}">{{item.Title}}</a> - 浏览量: {{item.Views}}</li>
    {% endfor %}
{% endarchiveList %}

By adjustingorderThe value of the parameter allows you to display the article list in different areas of the website with different logic, greatly enriching the diversity of content presentation.

The operational value brought by flexible sorting.

These flexible sorting options provided by AnQi CMS are not only technical features, but also powerful tools for content operation.It allows you to dynamically adjust content display strategies based on various factors such as content lifecycle, user interest, and seasonal hotspots.Whether it is pursuing time-sensitive news information, emphasizing hot topics in blog articles, or needing personalized recommendation product lists, corresponding solutions can be found in Anqi CMS, thereby effectively improving user stickiness, page stay time, and ultimately helping the website achieve better operational goals.

Conclusion

AnQi CMS is committed to providing users with an efficient and flexible content management experience.Sorting the article list in multiple dimensions provides powerful tools for content operators, allowing content to reach the target users in the most appropriate way, thereby maximizing its value.


Frequently Asked Questions (FAQ)

Q1: In addition to the article list, does AnQi CMS support sorting of the product list?A1: Yes, the content model design of Anqi CMS is highly flexible. The product list can also be accessed througharchiveListLabel (when the product is set to a content model) or similar label, utilizingorderThe parameter implements the same sorting method as the article list, for example, by ID (publish time), views, or custom sorting.

Q2: How can I display two lists, 'Latest Articles' and 'Popular Articles', on a single page?A2: You can use two labels separately in the same template filearchiveListto call the article. Set the first label toorder="id desc"to get the latest article, set the second label toorder="views desc"Get popular articles. Distinguish these two lists by different variable names (such aslatestArticlesandhotArticles), and display them separately.

Q3: How is the 'Backend Custom Sorting' operation performed, and what application scenarios does it have?A3: Custom sorting in the background usually occurs on the article or product editing page where there is a 'sort value' or 'weight' field. You can adjust the relative position of the article in the list by modifying this number (the smaller the number, the closer to the front it is, depending onorder="sort desc/asc"The setting). This sorting method is very suitable for the home page recommendation position, special article arrangement, or when you need to manually control the display priority of several specific articles.

Related articles

How to display a document list on the AnQiCMS website based on a specific category ID?

In AnQiCMS, displaying a document list based on a specific category ID is a very basic and commonly used feature, which allows us to flexibly organize and present website content.AnQiCMS's powerful template tag system makes this operation intuitive and efficient.No matter where you want to manually insert a category of documents on a page, or want the entire category page to automatically display the documents under it, the system provides the corresponding solutions.

2025-11-07

How does AnQiCMS display the latest article list on the homepage?

The homepage is the first impression of visitors arriving at the website, and the timely update of the latest article list can effectively enhance the activity and user stickiness of the website.For users using AnQiCMS, displaying the latest list of published articles on the homepage is a basic and important feature, which can be easily achieved through the flexible template tags provided by the system.AnQiCMS with its efficient and customizable features provides users with an intuitive template system.You do not need to delve deeply into the complex backend code, just master its powerful template tag usage

2025-11-07

How to display the previous article and

In website content operation, the user experience of the document detail page is crucial.A well-designed page not only effectively displays content but also guides visitors to delve deeper into more related information.Among them, providing the "Previous" and "Next" navigation functions for users is a commonly used and efficient strategy to improve the internal link structure of the website, reduce the bounce rate, and optimize the user's browsing path.This not only helps users conveniently explore more content, but also conveys the relevance and depth of the website's content to search engines, which has a positive impact on SEO.

2025-11-07

How to implement a paginated document list display in `archiveList`?

When managing website content, we often encounter such situations: there are many articles, products, or news under a certain category. If all the content is piled on a single page, it not only causes the page to load slowly and affects user experience, but also makes it difficult for visitors to find what they need in a sea of information.At this point, introducing pagination becomes particularly important. Pagination can break a large amount of content into several small pages, allowing users to browse page by page, greatly enhancing the usability and access efficiency of the website.In AnQiCMS, implementing a document list display with pagination is very intuitive and flexible

2025-11-07

How to get and display the detailed content of the current article in AnQiCMS template?

Build a content-rich website, the article detail page is undoubtedly the core.It carries the most specific and valuable information on the website, and it is also one of the pages where users spend the longest time and interact most frequently.In AnQiCMS (AnQi CMS), with its flexible template engine and rich tag system, we can easily obtain and elegantly display the detailed content of the current article.

2025-11-07

How to implement the display of multi-level navigation menus in AnQiCMS and support secondary dropdown menus?

A clear and intuitive navigation system is the key to the success of any website, it can guide visitors to quickly find the information they need and greatly enhance the user experience.AnQiCMS as an efficient content management system, provides flexible and powerful functions to build and manage the navigation menu of the website, including perfect support for multi-level structures and secondary dropdown menus. ### Define your navigation structure in AnQiCMS backend The first step in building a multi-level navigation menu in AnQiCMS is to configure it in the backend management interface.You can go to the **"Back-end Settings"** area

2025-11-07

How to customize the footer information of the AnQiCMS website, such as copyright statement and filing number?

## Custom AnQiCMS website footer information: Copyright statement and record number setting guide The website footer, although at the bottom of the page, is an indispensable area for conveying important information, establishing brand trust, and meeting legal requirements.A clear and complete footer can enhance the professionalism of the website and provide visitors with convenient legal information and contact details.This article will introduce in detail how to customize the copyright statement, filing number, and other information you want to display in the footer of the website in AnQiCMS.

2025-11-07

How to call and display the website logo image in AnQiCMS template?

In website operation, the Logo is not only a visual symbol of the brand, but also an important part of the website's professionalism and user experience.AnQiCMS (AnQiCMS) provides an intuitive and simple way to manage and call the website logo, allowing you to easily display your brand image in all corners of the website.This article will introduce how to set your website logo in the Anqi CMS backend and guide you to accurately and flexibly call and display it in the front-end template, ensuring that your brand image is perfectly presented.### In Anqi CMS backend to set the website logo First

2025-11-07