How to efficiently display and organize content in website operation directly affects user experience and the efficiency of information delivery.For users who use AnQiCMS, the system provides various flexible sorting and filtering options to help us accurately control the display order of list content. Whether it is articles, products, or other custom content types, they can be presented to visitors in the most business-friendly way.

The content display order control is given to the user by Anqi CMS, which is mainly realized through a powerful template tag system and background management settings.Through these features, we can easily prioritize the latest released content, make the most popular products stand out, or filter content from multi-dimensional aspects according to specific business needs.

Flexible control of the display order of content

To control the display order of the list content, we mainly usearchiveListThis core template tag. It not only retrieves the document list, but also built-in multiple sorting rules, allowing us to choose the most suitable display method for different scenarios.

Firstly, the most intuitive sorting method is to sort by content.publication time.order="id desc",The system will sort the documents by ID in descending order, which usually means that the latest published content will appear at the top of the list, which is very suitable for news, blogs, or websites with frequent updates.In reverse, if you want to trace earlier content, you can also choose to sort in ascending order.

Secondly, for websites that focus on content popularity, AnQi CMS supports sorting according to.View countto sort. Useorder="views desc"Those that receive the most attention and views will be ranked at the top, which is particularly useful for scenarios such as displaying popular articles, blockbuster products, or trend analysis, and can quickly attract users' attention.

Additionally, we can also usecustom sorting fields set in the backgroundAdjust the priority of the content. In the content publishing and editing interface, we can set a sorting value for each document.order="sort desc"The system will display content according to these predefined sorting values, with smaller numbers typically meaning they are closer to the front.This provides great flexibility for operation personnel, allowing them to manually boost the visibility of important content without changing the publish time or view count. For example, it can promote specific products or events.

Of course, Anqi CMS also providesrecommendation attributeslikeflag="h"Filter and prioritize the display of specific attribute content through various parameters, thereby indirectly affecting the display order and weight of the content.

Diverse filtering for precise positioning of the required content.

In addition to sorting, AnQiCMS also provides a variety of filtering options to help us accurately find the content that target audience wants to see from a massive amount of content:

Filter by content model and categoryis the most basic and commonly used method. No matter what your website is, whether it is articles, products, cases, or other custom content models, it can be done throughmoduleIdandcategoryIdParameters can be used to specify which category content under which model to display. For example, only display the "Company News" category under the "Article Model". We can also useexcludeCategoryIdExclude categories that you do not want to display in the current list, or bychild=falseto precisely control whether to include content from subcategories.

Filter by recommended attributesIt is also a powerful tool for enhancing content exposure. ThroughflagParameters, we can easily filter out all articles marked as "Recommended" or "Headline

keyword searchIs the entry point for users to actively search for information.archiveListtag supportqParameters that can be used to match document titles containing specific keywords, to implement in-site search functionality. CoordinatedarchiveFiltersTags, even can directly perform keyword search and content filtering based on the query parameters in the URL on the list page, without additional development.

Filter by tag (Tag)It provides a more flexible way of organizing content.tagDataListlabel, throughtagIdParameters, we can easily display all documents under a specific tag, achieving a function similar to 'Hot Topics' or 'Related Tags'.

For those who havemultiple authorsoruser submissionsThe website, AnQiCMS allows us to filter according touserIdFilter specific user published content, convenient for displaying personal portfolios or building author homepages.

In addition,Filter by parent document(parentIdAlso very useful, especially when building a series of tutorials or content with a clear hierarchical structure, as it can conveniently display all related sub-documents under a main document.

One of the most powerful filtering capabilities of AnQiCMS is体现在Advanced customized parameter filteringIn the background, when creating content models, we can define various custom fields (such as "room typearchiveFiltersTags can generate filter conditions based on these custom fields and convert them into URL parameters. When users click on these filter conditions on the frontend, the page URL will automatically update.archiveListLabels will intelligently filter out documents that meet all conditions based on the parameters in the URL.This combination filtering function greatly enhances the flexibility of content display and the efficiency of users discovering content.

Concluding remarks

Whether it is through precise sorting to guide user focus or through multi-dimensional filtering to meet personalized needs, Anqi CMS provides comprehensive and powerful tools for website operators.These features are seamlessly integrated into the template tag system, making it possible to achieve fine-grained control over the display order and filtering logic of content without writing complex code.Master these options, and it will help your website better organize content, optimize user experience, and ultimately improve the overall operation of the website.


Common Questions (FAQ)

1. How to implement the "top" feature so that some important content always appears at the top of the list?

To implement the content "toparchiveListthe label to call content.orderparameter settingsorder="sort desc",System will prioritize displaying the content you manually set with a high sorting value. In addition, you can also add a special "recommend attribute" (such as "headline[h]") for important content, and then throughflag="h"Parameters are called separately at the top of the list to achieve the effect of topping.

2. I want to display the latest articles as well as the most popular (highest views) articles in a list module, can this be done?

Of course you can. You can combine the use ofarchiveListLabel to implement. The usual practice is to call the template twicearchiveListLabel. The first call setsorder="id desc"andlimitParameters (e.g.,)limit="5") to get the latest 5 articles; the second call setsorder="views desc"and anotherlimit参数来获取最热门的文章。这样,您就可以在同一个页面或模块中,并行展示两种不同排序逻辑的内容。

3. 'Advanced Custom Parameter Filtering' is how it is associated with the backend content model? What configuration do I need to use it?

The core of "Advanced Custom Parameter Filtering" lies in the content model.You need to add custom fields (such as 'Article Type', 'Publisher Identity', etc.) for the content model you are using in the 'Content Management' -> 'Content Model' section of the AnQi CMS backend.When adding these custom fields, you can specify their type (such as single choice, multiple choice, dropdown selection) and set optional values.archiveFiltersThe tag can recognize these fields and automatically generate the corresponding filter link.When the front-end user clicks on these links, the system will match these custom field values according to the URL parameters, thereby filtering out the document list that meets the conditions.