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

Calendar 👁️ 67

As a senior website operations expert, I have accumulated rich experience in the content management and operations practice of AnQiCMS. Today, we will delve deeply into a common issue that users are concerned about: AnQiCMS'sarchiveFiltersCan the tag be combined with multilingual support to provide language filtering conditions?

To answer this question, we need to understand the multilingual mechanism of AnQiCMS andarchiveFiltersThe working principle of tags. AnQiCMS, as an enterprise-level content management system, its multilingual capability is one of its core advantages, aimed at helping users expand their global market.

The multi-language mechanism of AnQiCMS: basics and scope

According to the official document of AnQiCMS, the system provides powerful multilingual support.It allows users to switch and display multilingual content, which is crucial for global content promotion.For example, by setting the default language package in the background, the system interface and some built-in prompts can be displayed in the selected language.Furthermore, throughlanguagesTags, template developers can easily implement language switching functions on the front-end and generate SEO-compliant contenthreflang.

However, it is important to note that AnQiCMS's multilingual support mainly manifests in the language switching of the system interface, template level, and content distribution.The document clearly states: “This is only to modify the built-in text, and the articles on the template as well as the document.”Categorization content text, it will not change due to the language package set here.This means that for user-defined content such as article titles, content, category names, and the filter criteria values we are about to discuss, the system will not automatically translate.

archiveFiltersLabel: The foundation of dynamic filtering

archiveFiltersThe tag is a very practical feature in AnQiCMS, it allows us to dynamically generate filtering conditions based on the custom fields defined in the document content model.For example, on a real estate website, you can generate filters based on custom fields such as 'property type', 'location', 'price range', etc.

The usage method of this label is as follows:{% archiveFilters filters with moduleId="1" allText="全部" %}It will output an array object containing filtering parameters (filters), each parameter also contains its name (Name), field name (FieldName)and a series of options(Items)ItemsEach element contains aLabel(Display text of the filtered value)andLink(URLs after clicking the filter)。TheseLabelThe text directly comes from the default value you set in the content model custom field or the specific value you choose when entering content.

Combining challenges and strategies: Implementing multilingual filtering conditions

How do we return to the core issue: how to letarchiveFiltersProvide multi-language filtering options? Considering that AnQiCMS does not automatically translate custom content, we need to adopt some strategies to make up for this.

The core of the challenge lies in: archiveFiltersLabel outputLabelThese values are based on the preset content model or the actual values filled in the content, which are not keys in the multilingual dictionary, and the system cannot automatically translate them into the current website language.

Here are several feasible strategies, each with its advantages and disadvantages, suitable for different scenarios:

1. Independent management of multi-site/multi-language instances (recommended for strict separation)

If your business requires a very high level of independence in multilingual content and filtering, and has sufficient budget and management resources, the most direct and thorough way is to set up a separate AnQiCMS site instance for each language, or to create independent sub-sites for each language using AnQiCMS's multi-site management feature.

  • Advantage:Each site's content, filtering conditions, and even custom fields can be fully independently configured, without interference, and managed clearly.
  • Shortcomings:Increased operational and maintenance costs, content may need to be entered repeatedly or synchronized across sites.
  • Implementation method:In each language version of the site, define the custom fields and their default filter options in the content model according to the language requirements.For example, the English site is configured with “Apartment”, “Villa”, and the Chinese site is configured with “Apartment”, “Villa”.archiveFiltersTags will naturally display the filtering conditions of the current site language.

2. Utilization within a single site.trLabel for front-end translation (recommended for fixed and controllable filtering conditions)

This is a common and relatively economical method to implement multi-language filtering conditions in a single AnQiCMS instance. The core idea is to letarchiveFiltersOutput the original (usually the main language) filtered value, then use the AnQiCMS translation tagtrConverted and displayed on the front end.

  • Implementation steps:
    1. Custom field definition of content model:Define custom fields in the content model (for examplePropertyTypeSet a default filter option for it. These values should use a unified "key" or master language (for example, "Apartment", "House").
    2. Enter content:When publishing documents, select or fill in the corresponding (primary language) values for these custom fields.
    3. Language package configuration:Create in your template directorylocalesFolder, and configure corresponding for each languagedefault.ymlFile. In thisymlIn the file, translate all the filter value keys (such as "Apartment") and their translations in different languages

Related articles

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

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

As an experienced website operations expert, I have a deep understanding of AnQiCMS's functional and content operation strategies.Today, we will discuss a question that many users may be concerned about: Does the `archiveFilters` tag support controlling the sorting method of custom parameters?

2025-11-06

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 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

How to exclude documents of a specific category in `archiveList` to display accurate content?

As an experienced website operations expert, I am well aware of the importance of accurate content display for user experience and website operation efficiency.In a content management system, we often encounter the need to exclude certain specific categories of documents when generating article lists, in order to ensure the relevance and focus of the content.AnQiCMS (AnQiCMS) is an efficient and flexible content management tool that provides us with a very convenient solution.

2025-11-06

How to use the `archiveList` tag to get documents with specific recommended attributes (such as "Top Stories" or "Slideshow")?

As an experienced website operations expert, I am well aware of the core value of a content management system (CMS) in terms of its flexibility and content scheduling capabilities.AnQiCMS (AnQiCMS) boasts its efficient architecture based on the Go language and rich features, providing strong support for content operations.Today, let's delve into a very practical scenario in content operation: how to accurately obtain and display documents with specific recommendation attributes using the `archiveList` tag, such as the website's 'headlines' news or important content for the 'slideshow' carousel.

2025-11-06