How to efficiently display and organize content in website operation, which directly affects user experience and the efficiency of information delivery.For users of AnQiCMS, the system provides a variety of 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, all of which can be presented to visitors in the most business-oriented way possible.

The AnQi CMS hands over the control of content display order to the user, which is mainly achieved through a powerful template tag system and backend management settings.With these features, we can easily prioritize the latest released content, highlight the most popular products, or filter content in multiple dimensions based on specific business needs.

Flexible control of the display order of content

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

Firstly, the most intuitive sorting method is based on the content of theRelease Time. By settingorder="id desc"The system will sort the documents by ID in descending order, which usually means that the latest content will be displayed at the top of the list, which is very suitable for news, blogs, or websites with frequent updates.On the contrary, if you want to trace back the early content, you can also choose to sort in ascending order.

Secondly, for websites that focus on the popularity of content, Anqi CMS supports sorting according toview countto sort. Useorder="views desc"Those that receive the most attention and reading are ranked in front, which is particularly useful for displaying popular articles, hot products, or trend analysis, and can quickly attract users' attention.

In addition, we can also sort according tocustom sorting field 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. Throughorder="sort desc"The system will display the content according to these preset sorting values, and the smaller the number, the closer it is to the front.This provides great flexibility for operators, allowing them to manually increase the visibility of important content without changing the publication time or views, such as promoting specific products or events.

Of course, Anqi CMS also providesRecommended attributeAs for flag="h"Parameters to filter and prioritize the display of specific attribute content, which indirectly affects the display order and weight of the content.

Precisely locate the diversified filtering of the required content.

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

Filter by content model and categoryIt is the most basic and commonly used method. Whether your website is articles, products, cases, or other custom content models, you can pass throughmoduleIdandcategoryIdParameters are used to specify which category content under which model to display. For example, only display the "Article Model" under the "Company News" category. At the same time, we can also useexcludeCategoryIdExclude the categories you do not want to display in the current list, or throughchild=falseto precisely control whether to include the content under subcategories

Filter by recommended attributesIt is also a tool to enhance content exposure. ThroughflagParameters, we can easily filter out all articles marked as "recommended" or "headline", and display them in a specific area of the website, such as the "Editor's Picks" module on the homepage.

Keyword searchIs the entry point for users to actively seek information.archiveListTag supportqParameter, can be used to match document titles containing specific keywords to realize the in-site search function. With the cooperationarchiveFiltersTags, even search and content filtering can be automatically performed directly on the list page based on the query parameters in the URL, without additional development.

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

Formultiple authorsoruser submissionsThe website, AnQiCMS allows us to filter according touserIdfilter the content published by specific users, convenient for displaying personal portfolios or building author homepages.

Furthermore,filter by parent document level(parentIdIt is also very useful, especially when building a series of tutorials or content with clear hierarchical structures, as it can conveniently display all related sub-documents under a main document.

One of the most powerful filtering capabilities of AnQiCMS is reflected inAdvanced custom parameter filtering. When creating a content model in the background, we can define various custom fields (such as the "type", "area", "price range", etc. of a real estate website).archiveFiltersTags can be generated based on these custom fields to create filtering conditions and convert them into URL parameters. When users click on these filtering conditions on the front end, the page URL will automatically update,archiveListThe tag will intelligently filter out documents that meet all conditions based on the parameters in the URL.This combination filter function greatly enhances the flexibility of content display and the efficiency of users discovering content.

Conclusion

Whether it is to guide the user's focus through precise sorting or to meet personalized needs with multi-dimensional filtering, Anqi CMS provides comprehensive and powerful tools for website operators.These features seamlessly integrate into the template tag system, making it possible to finely control the display order and filtering logic without writing complex code.Mastering these options will help your website better organize content, optimize user experience, and ultimately enhance the overall operational effectiveness of the website.


Frequently Asked Questions (FAQ)

How to implement the "pin to top" feature so that some important content is always displayed at the top of the list?

To implement the 'top content', the most direct method is to edit the document in the background and set a higher 'display order' value for it. In the template, usearchiveListto call the content tag, theorderthe parameter toorder="sort desc"The system will prioritize displaying the content you manually set with a high sorting value. In addition, you can also add a special "recommendation attribute" (such as "headline[h]") for important content, then throughflag="h"The parameter is called separately at the top of the list to achieve the effect of prioritization.

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

Of course. You can combine them usingarchiveListTag to implement. The usual practice is to call it twice in the templatearchiveListTag. When called for the first time, setorder="id desc"andlimitParameters (for examplelimit="5") to get the latest 5 articles; when called the second time, setorder="views desc"and anotherlimitParameters to retrieve the most popular articles. This way, you can display content with two different sorting logic on the same page or module.

3. How is the "Advanced Custom Parameter Filtering" 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 selection, multiple selection, dropdown selection) and set optional values.Once defined,archiveFiltersTags can recognize these fields and automatically generate corresponding filtering condition links.When the front-end user clicks on these links, the system will match the custom field values according to the URL parameters to filter out a list of documents that meet the conditions.