What sorting methods does AnQi CMS support to display articles and product lists?

Calendar 👁️ 70

How to flexibly display article and product lists in a content management system is the key to improving user experience and optimizing information architecture.AnQiCMS (AnQiCMS) has provided us with a variety of practical sorting methods in this aspect, allowing us to accurately present information based on different business needs and content strategies.

Core sorting mechanism: Flexible control of content order

The Anqi CMS enables fine-grained control over the order of article and product listings through its powerful template tag system. The most direct way to sort is manifested inarchiveListandtagDataListContent list label'sorderIn the parameters.

  1. Custom sorting in backendThis is the most basic and most flexible sorting method. In the content management backend, you can manually adjust the display order of articles or products in the list according to your actual operational needs.When you use in the templateorder="sort desc"When, the list will be strictly arranged in the custom order set in the background.This means you can manually push important content that needs to be displayed first, without changing other attributes such as the publish time or view count, which is especially convenient when making thematic recommendations or new product launches.

  2. Sorted by publish ID (newest/oldest)For content that needs to emphasize timeliness, such as news updates, blog articles, or new product releases, sorting by release ID is**a choice.

    • Useorder="id desc"The content is arranged in descending order by publication ID, which usually means that the latest content will be displayed at the top of the list. This allows users to get the latest information first.
    • Useorder="id asc"Content is arranged in ascending order by publication ID, with the earliest published content at the top of the list, suitable for displaying the development history of content or tracing back by creation time.
  3. Sort by view count (popular/unpopular)Would you like to display the most popular or highly regarded content on the website? Anqi CMS supports sorting by the view count of content.

    • Useorder="views desc"The list will be sorted by view count from high to low, presenting the most popular articles or products to users.This helps to increase the exposure of popular content, guiding users to discover the精华 content of the website.
    • Theoretically, it can also be done.views ascTo showcase less popular content, but it is rarely used in operation.

An auxiliary strategy that affects the order of content display.

In addition to the direct sorting parameters, Anqi CMS also provides a variety of functions, which, although not direct sorting commands, can effectively affect the final presentation order and priority of content on the page.

  1. Recommended Attribute (Flag) FilterThe articles and products of Anqi CMS support setting various 'recommended attributes', such as 'Headline[h]', 'Recommended[c]', 'Slider[f]', and so on.These properties can be used as powerful filtering criteria. For example, you can first filter out all articles with the 'recommended[c]' attribute, and then apply the above publishing ID or view count sorting in this subset.This combination of 'first filter then sort' can allow you to accurately display key operational content on the homepage or in specific areas, such as 'This week's editor's picks' or 'Homepage carousel products'.

  2. Timed publishing functionThe AnQi CMS supports setting future publish times for articles and products.Although the content will not appear in the front-end list before it is published, but once it reaches the set time, it will naturally integrate into the list according to its publishing ID (usually in chronological order).This is an excellent automation tool for the content editing team, ensuring that content goes live on schedule without human intervention.

  3. Custom Field and Template Logic of Content ModelOur AnQi CMS allows us to define rich custom fields for articles and products, such as "product rating", "product price", etc. AlthougharchiveListThe label does not directly support sorting based on these custom fields, but we can use these fields to implement more complex display logic in the template.For example, after obtaining a list of contents in a template, you can write additional template logic (such as using conditional judgment or Go language sorting functions) to sort or highlight based on custom fields, thereby achieving requirements such as "price from low to high", "highest rating", and so on.

  4. Display order of categoriesAlthough this mainly controls the arrangement of the category itself, the display order of the category indirectly affects the user's browsing path of the content.In the background, you can adjust the order of categories, the smaller the number, the earlier it appears.If your content list is displayed by category, then the order of the categories will naturally affect the overall presentation order of the下属 articles or products.

In summary, Anqi CMS not only provides basic and practical content sorting options, but also offers a rich toolbox for content operators and website developers through its flexible content model and template system, to meet various complex content display needs.By skillfully applying these sorting methods and auxiliary strategies, we can make the content organization of the website more efficient and the user experience more smooth.


Frequently Asked Questions (FAQ)

1. How can I set the default sorting method for articles or products in the background?The default sorting of Anqi CMS usually follows the "custom sorting" rule.This means you can go to the content management backend, enter the article list or product list, and manually adjust the order of content through drag and drop or other editing tools. In addition,archiveListin the labelorder="sort desc"The parameter is used to call the custom sorting set in the background.

2. Does AnQi CMS support multi-condition combination sorting, such as sorting by category first, then by publication time?directly inarchiveListortagDataListlabel'sorderSet multi-condition combination sorting in the parameters (such asorder="category desc, id desc"It is not directly supported. The usual implementation is:

  • Step by step retrieval and display:You can first go through:categoryListUse tags to get all categories, then iterate through each category, and within each category, use tags to get the information.archiveListTags are retrieved under the category based on the release time or other conditions.
  • Logic processing inside the template:If you need to implement multi-condition sorting in a unified list, you may need to obtain a larger content collection in the template, and then implement it through more advanced template logic (such as writing custom filters or through secondary development before the data is passed into the template).

3. Can I sort articles or products based on a custom field (such as 'Product Price' or 'Expert Rating') with Anqi CMS? archiveListlabel'sorderThe parameter does not directly support specifying custom fields for sorting. But you can:

  • By filtering and highlighting:Use custom fields to filter content, for example, to only display products with "high ratings". Then, apply ID or view count sorting within this filtered subset.
  • Template-level secondary processing:In the template, you can obtain a list of articles or products containing custom fields, and then by writing template logic (such as usingforloop andifConditions) to simulate sorting or highlighting specific content. For more stringent sorting requirements, it may be necessary to extend the template engine of Anqi CMS or implement sorting by custom fields through secondary development on the server.

Related articles

How to implement article list filtering by category, tag, or recommended attributes?

In website operation, how to efficiently organize and display a large amount of content, and ensure that users can quickly find the information they need, is the key to improving user experience and content value.AnQiCMS (AnQiCMS) provides powerful content management functions, among which the flexible filtering mechanism of the article list can help us easily achieve precise presentation of content.This article will discuss in detail how to filter and display article lists in Anqi CMS through categories, tags, and recommended attributes.--- ### Accurately Present: How to filter and display Anqi CMS article list by category, tag, or recommended attributes

2025-11-08

How to customize the article display form in AnQi CMS based on the content model?

In Anqi CMS, using the content model to flexibly define the display form of articles is one of its core advantages.It can make your website content not limited to traditional 'article' or 'product' formats, but can present diverse content structures according to actual business needs.In the digital world, the content carried by websites is much richer than we imagine.

2025-11-08

How does the AnQiCMS Sitemap tool improve the visibility of a website on search engine results pages?

In today's highly competitive online environment, ensuring that your website content is discovered and displayed at the top of search engine results pages (SERP) is fundamental for enhancing brand visibility and attracting potential users.AnQiCMS (AnQiCMS) is well aware of this as a content management system designed specifically for small and medium-sized enterprises and content operation teams.It comes with a powerful Sitemap tool designed to help users efficiently optimize their websites, thereby significantly improving their visibility in search engines.What is a Sitemap?

2025-11-08

How to ensure that the data collected through content acquisition and batch import can be displayed quickly on the front page?

In website operation, efficient content management is the key to improving user experience and SEO effectiveness.AnQiCMS (AnQiCMS) relies on its powerful content collection and batch import functions, greatly reducing the burden of content construction.However, we often encounter a core issue: How can we ensure that the content imported or collected through automated means is displayed on the front page to the user quickly and without delay?The Anqi CMS was designed with efficiency in content management and timely front-end display in mind, its underlying mechanisms and operational strategies can effectively help us solve this problem

2025-11-08

How to configure a custom display template for the document detail page?

Manage website content in AnQi CMS, flexibility is one of its core advantages.When you need to present a unique content layout or style for a specific document detail page, the system provides powerful custom template functionality.This means that you can configure a dedicated display template for the document based on its type, content, and even specific document requirements, thus breaking away from the one-size-fits-all approach of traditional CMS and creating pages with greater appeal and functionality.The reason why AnQi CMS can achieve this is due to its 'flexible content model' design and the continuous enhancement of template customization capabilities in system iterations

2025-11-08

How to set up document thumbnails and control their display on list pages?

In a content management system, a striking thumbnail can greatly enhance the attractiveness of the content, whether it is in an article list, product display, or other content aggregation pages, it is an important visual element to guide users to click.AnQiCMS (AnQiCMS) is well aware of this and provides flexible thumbnail settings and display control features to help optimize the visual effects and user experience of your website.Next, we will discuss in detail how to set the thumbnail of the document in Anqi CMS and master its various display methods on the list page.### The First Part

2025-11-08

How to use the pseudo-static function of AnQi CMS to optimize URL display and improve SEO effect?

In website operation, the URL (Uniform Resource Locator) plays a vital role.A clear, meaningful, and easy-to-understand URL not only improves user experience but is also an indispensable part of search engine optimization (SEO).The traditional dynamic URL often contains parameters and numbers that are difficult to understand, while the pseudo-static URL, through rewriting technology, makes it look as simple and standardized as a static HTML page, thus gaining the favor of search engines and users.AnQiCMS (AnQiCMS) knows the impact of URL structure on website SEO

2025-11-08

How to batch replace keywords or links in the entire site's content and display them immediately?

In website operation, we often encounter situations where we need to adjust a large amount of content, whether it is to adapt to new brand strategies, unify website terminology, fix broken links, or better optimize SEO, these all require batch updating of keywords or links throughout the entire site.Manually modifying one by one not only takes time and effort, but is also prone to errors.The AnqiCMS provides a very practical feature that allows you to easily deal with such challenges: batch replacement of keywords or links in the entire site content, and ensure that changes take effect immediately.This ability is crucial for the daily operation and maintenance of the website

2025-11-08