Does the `archiveFilters` tag support controlling the sorting method for custom parameters?

Calendar 81

As an experienced website operations expert, I have a deep understanding of AnQiCMS (AnQiCMS) 's functional and content operation strategy. Today, we will discuss a topic that many users may be concerned about: archiveFiltersDoes the tag support control over the sorting method for custom parameters?

In-depth analysisarchiveFiltersDesign intent and functional boundaries

In the template system of Anqi CMS,archiveFiltersThe tag is designed as a powerful tool specifically for building dynamic filtering conditions.The core function is to automatically generate a series of filter options that users can choose from based on the custom parameters you define for the content model in the background (for example, product colors, sizes, article authors, series, etc.).These options are usually presented as links, and when the user clicks on them, the corresponding query parameters are added to the current page URL, thus achieving dynamic filtering of content.

For example, on a real estate website, you may define custom parameters such as 'floor plan', 'price range', 'decoration condition', etc. ByarchiveFiltersLabel, the system can automatically render filter conditions such as "One bedroom and one living room?huxing=两室两厅The parameter, the website will display content that meets the condition.

However, if you read carefullyarchiveFiltersThe official documentation of the tag will reveal that it does not provide any parameters directly used for controlling sorting, such asorderorsort. This is not a lack of functionality, but rather originates from its clear design positioning:archiveFiltersLies in the responsibility ofGenerate filtering conditionsTo help users narrow the scope of content, rather than on the final presentation of content,Arrangement orderIt focuses on 'How users can find the content they want based on certain conditions', rather than 'What order the found content should be displayed in.'

The attribution of sorting function:archiveListThe responsibility of tags

So, when we want to sort this filtered content, what should we do? The answer lies in another core tag of Anqi CMS:archiveList.

archiveListThe tag is a universal tag used in AnQi CMS to retrieve and display document lists. It can retrieve content based on various conditions (such as category ID, model ID, recommendation attributes, etc.). Among them,archiveListLabels clearly providedorderParameters allow you to specify the display sorting rules for the document. You can sort by built-in fields, such as sorting by the most recent published date (id descOr sort by the most viewedviews descEven can be sorted according to the custom sorting field of the backgroundsort descto arrange

From the design philosophy of Anqi CMS,archiveFilterswitharchiveListPlaying different roles, they form a clever collaborative relationship.archiveFiltersResponsible for constructing URLs with filtering parameters, andarchiveListthen responsible for parsing these URL parameters (when itstypeis set topageAt its ownorderThe parameters sort the retrieved data. This means thatarchiveFiltersHelped the user generate a “filter”, andarchiveListThen according to the result of the 'filter', the content will be presented according to the preset 'sort rule'.

Therefore, when you need to implement the filtering and sorting function on the page, the usual practice is toarchiveFilterstags for rendering the filtering UI, and toarchiveListLabel placement on the same page to display the content list. When the user passes througharchiveFiltersfiltering through the generated link.archiveListIt will automatically receive and process the filtering parameters in the URL, then sort and display the filtered results according to its internal settings.orderIn short,

Summary

In summary,archiveFiltersTags in AnQi CMS focus on generating dynamic content filtering options, and they do not have the ability to control content sorting. The sorting function is controlled byarchiveListThe tag can take on, you can set it througharchiveListoforderParameters to implement various sorting needs for content.Understanding the division of responsibilities and collaboration mechanism between these two will help you build and manage the content display logic of the Anqin CMS website more efficiently and flexibly.


Frequently Asked Questions (FAQ)

  1. How to create and manage custom parameters in Anqi CMS?You can find the 'Content Model' feature under the 'Content Management' module in the AnQi CMS backend.Click to enter and you can choose to edit existing models (such as 'Article Model', 'Product Model') or create a new custom model.In the model editing interface, you can add various types of 'custom fields', and set parameters name, calling field, field type, whether it is required, and default value.archiveFiltersAs the basis for filtering.

  2. archiveFiltersWill the generated filter link automatically update the content list? archiveFiltersThe tag itself is responsible for generating URLs with filtering parameters. To make the page content dynamic after clicking on these links, you need to use the tag in conjunction with the page.archiveListthe tag and use it.typethe parameter topageThus,archiveListCan read query parameters from the URL and automatically filter and display the corresponding content.The page usually reloads, or it can be refreshed without a page reload by working with JavaScript on the front end.

  3. Can I sort the content according to the value of the custom parameters?The current AnQi CMSarchiveListlabel'sorderParameters mainly support based on built-in fields (such asid/views/sortSort by performing. If your requirement is to sort based on a custom parameter value or a specific rule, this usually requires combining URL parameter passing with sorting instructions, andarchiveListParse these parameters in the tag, or you may need to customize template logic even perform secondary development of the AnQi CMS to achieve more complex sorting functions. The official documentation does not specify directlyarchiveListCan pass throughorderParameters directly sort the custom fields.

Related articles

How to handle user prompts when the filtering result is empty when using `archiveFilters` tag?

## Optimize the empty result prompt of the `archiveFilters` tag in AnQiCMS, improve user experience In the template development of AnQiCMS, the `archiveFilters` tag is undoubtedly a powerful tool for building flexible content filtering functions.It allows us to provide users with dynamic filtering options based on predefined document parameters, thus helping users quickly locate the content they are interested in.However, whether the filter options themselves are empty, or the user applies filter conditions and does not find matching content, these two 'empty result' states if not handled properly

2025-11-06

How to design UI/UX for the `archiveFilters` tag when there are many filtering conditions to keep it clear and easy to use?

As an experienced website operations expert, I know that an excellent CMS system not only needs to provide strong backend functions but also needs to present the ultimate user experience on the front end.AnQiCMS (AnQiCMS) demonstrates tremendous potential with its high-performance architecture based on the Go language and flexible template tag system.Today, let's delve deeply into how to maintain a clear and easy-to-use page through clever UI/UX design when there are many document filtering conditions in Anqi CMS (implemented through the `archiveFilters` tag).

2025-11-06

How to add independent titles or descriptions to each filter group of the `archiveFilters` tag?

As an expert in the operation of AnQiCMS, I am happy to answer your question about how to add independent titles or descriptions to each filter group in the `archiveFilters` tag.This can greatly enhance the user experience and make the website's filtering function more intuitive and friendly.

2025-11-06

Does AnQi CMS plan to enhance the intelligent recommendation filtering function of the `archiveFilters` tag in future versions?

As an experienced website operations expert, I have accumulated rich experience in the practice of content management systems (CMS), especially in understanding the various functions and content operation strategies of AnQiCMS (AnQi CMS).Today, we will discuss a topic that many content operators and website developers are concerned about: Does AnQi CMS plan to enhance the intelligent recommendation filtering function of the `archiveFilters` tag in future versions??### `archiveFilters` tag's current capability analysis

2025-11-06

How will the `archiveFilters` tag display and handle if a document belongs to multiple filter parameter values?

## AnQi CMS `archiveFilters` tag: How will it elegantly present when a document meets multiple filter conditions?As an experienced website operations expert, I am well aware that the discoverability of content is crucial for user experience and SEO.AnQiCMS provides many powerful and flexible features in content management, among which the `archiveFilters` tag is undoubtedly a powerful tool for building advanced filtering interfaces and improving content navigation efficiency.

2025-11-06

`archiveFilters` label can be combined with AnQiCMS's multilingual support to provide multilingual filtering conditions?

As an experienced website operations expert, I have accumulated rich experience in the content management and operations practice of AnQiCMS.Today, we will delve into a commonly discussed issue by users: Can AnQiCMS's `archiveFilters` tag be combined with multilingual support to provide multilingual filtering conditions?To answer this question, we need to understand the multilingual mechanism of AnQiCMS and the working principle of the `archiveFilters` tag.AnQiCMS as an enterprise-level content management system

2025-11-06

How to use the `archiveList` tag of AnQiCMS to get the document list under a specified content model?

AnQiCMS Content Management: The secret to accurately obtaining the document list with the `archiveList` tag As an experienced website operations expert, I know that the core value of a content management system (CMS) lies in its ability to organize and display content.In the AnQiCMS, this efficient and flexible Go language content management system, the `archiveList` tag is undoubtedly a powerful weapon in the content display process.It is not just a simple content call tag, but also a key bridge connecting your website content model with the front-end display logic.

2025-11-06

How to filter and display documents based on multiple category IDs for the `archiveList` tag?

As an experienced website operations expert, I fully understand that the flexibility of a content management system is crucial for efficient operations.AnQiCMS (AnQiCMS) provides us with great convenience with its powerful template tag system.Today, let's delve deeply into a very practical feature: how to use the `archiveList` tag to filter and display documents based on multiple category IDs, thereby creating more targeted and attractive content modules.

2025-11-06