Auto CMS as an efficient enterprise-level content management system provides many flexible tags and functions in terms of content display and management. Among them,archiveFiltersTags are often used by website operators to build complex document filtering interfaces due to their powerful filtering capabilities. However, many users may have a question when trying to build a filtering function: “archiveFiltersLabel whether it supports filtering based on Tag tags, in addition to filtering based on custom parameters? Today, let's delve into this issue in depth.
archiveFiltersTag: Born for structured filtering.
Firstly, we need to be cleararchiveFiltersThe core positioning and design purpose of the tag. According to the document description of Anqi CMS.archiveFiltersLabel 'Used for filtering list combinations based on various parameters of the document', especially emphasizing its application in multi-condition, structured filtering scenarios such as 'when making a real estate website, you can filter by house type such as residential, commercial, and commercial residential, and you can also filter by house size such as single room, one bedroom and one living room, two bedrooms and two living rooms, three bedrooms and two living rooms, etc.'
This means,archiveFiltersThe label mainly focuses on those "custom parameters" with explicit structure and optional values defined in the background "document additional automatic configuration".These parameters usually correspond to the fields in the content model, allowing for preset options for users to choose from, thereby achieving a fine-grained content filtering.archiveFiltersWhen labeling, it will traverse these custom parameters and generate a list containing the 'All' option and specific filtering values for each parameter for the user to click and select. Finally, the filtering conditions are passed to the backend through the URL's query parameters to achieve dynamic loading and display of content.
Fromtag-/anqiapi-archive/145.htmlThe parameter list shows that it supportsmoduleId(Model ID),allText(All keywords text) andsiteId(Site ID) These parameters control the behavior of the control tags. However, there is no direct parameter provided to specify or identify the Tag tag, such astagIdortagName。The document also clearly states that, 'The filtering parameters are only available for list typestype="page"Valid immediately, the filtering parameters only need to be placed on the query parameters of the url.In the additional automatic configuration of the document, configurable fields have been set, which can be used to filter the document by appending these fields to the query parameters of the url.archiveFiltersThe focus of the label is on handling custom parameter filtering associated with content model fields.
Tag label: independent classification and filtering mechanism
Then, how does the Tag label play a role in the Security CMS?The CMS treats Tag as an independent 'relationship method' that can establish connections between different content models and categories.help-content-archive.mdMentioned that "You can add multiple tags to the document, and tags are somewhat similar to topics. They can associate documents of the same category together in a way other than just classification."
To support the aggregation and filtering of content under Tag tags, AnQi CMS provides specialtagList(Get Tag list) andtagDataList(Get document list under a specified Tag) tags. In particulartagDataListLabels, which are designed to "retrieve the document list of a specified Tag", allowing us to according totagId(Tag ID)to retrieve all associated documents. This means that the Tag label has its own complete and independent filtering and display logic.
In summary,archiveFiltersTags and Tag tags play different roles in AnqiCMS.archiveFiltersMore focused on multi-dimensional combination filtering of document structured custom properties, while Tag labels provide a loose, topic-oriented content aggregation method,tagDataListThe label is responsible for displaying and filtering its content.
The idea for combining Tag with custom parameters for filtering is
AlthougharchiveFiltersThe tag itself does not directly support filtering based on Tag tags, but this does not mean that we cannot implement a combination filter based on Tag and custom parameters.As website operation experts, we always find flexible solutions.
One feasible idea is to use the filtering of Tag labels as the first step, bytagDataListTag获取到特定Tag下的所有文档ID。然后,将这些文档ID传递给一个自定义的archiveListQuery (if the backend supports passing a list of document IDs for filtering), and then apply this on top of thatarchiveFiltersGenerated custom parameter filtering condition.This usually requires some frontend JavaScript logic or backend development to coordinate the two filtering processes.archiveFiltersThe generated URL, or submit a request containing all filter conditions (including Tag ID) again via AJAX.
Another indirect method is, if the number of Tag tags is not very large, and each Tag can be mapped to certain custom parameters, then this mapping relationship can be preprocessed on the backend, or the Tag name or ID can be parsed as per the custom URL routing rules.archiveFiltersThe ability to recognize custom parameter values. However, this usually increases the complexity of the system.
Therefore, directly answer the main question of this article:archiveFiltersThe tag itself does not directly support filtering based on Tag tags, it is mainly used for handling document custom parameter filtering. Tag tags in Anqi CMS have an independent filtering mechanism,tagDataListLabel.But by flexibly using the front-end logic and back-end data processing capabilities, we can still achieve the functionality to meet the needs of Tag and custom parameter combination filtering.
Common Questions and Answers (FAQ)
archiveFiltersandtagDataListWhat are the essential differences between them?archiveFiltersThe tag is designed to provide a multi-dimensional combination filtering interface and logic for the customized parameters of document structuring. It generates filtering conditions based on the predefined model fields and their optional values.tagDataListThe label is specifically used to retrieve the document list associated with a specific Tag tag, its core lies in aggregating content based on the unstructured, topic-oriented association method of Tag.Both serve different content organization and filtering dimensions.I can be in
archiveFiltersDo you filter directly using the Tag's name or ID?No. According to the document description of AnQi CMS,archiveFiltersThe label filtering logic is based on the "Custom Parameters" configured in the background content model.It will not recognize or process Tag tags directly.tagDataListLabel.How to implement a complex combination function that filters by both custom parameters and Tag tags in AnQi CMS?Due to
archiveFiltersandtagDataListThe focus is different, you cannot directly combine the two with a single tag. But it can be achieved in the following way:- Combining front-end logic:First use:
tagDataListRetrieve the document ID list under a specific Tag, and then use front-end JavaScript to handle these document IDs andarchiveFiltersThe generated custom parameter filtering conditions are passed to the backend for comprehensive query. This may require backend API support to receive a list of document IDs for secondary filtering. - Backend customization development:In the backend of AnQi CMS, perform secondary development, write custom logic to receive Tag ID and custom parameters, and then execute a joint database query to return the list of documents that meet the conditions to the front-end template.
- Indirect Mapping:If the number of Tags is limited and there is a one-to-one or one-to-many mapping relationship with certain custom parameters, Tag filtering can be converted to... via the backend or through URL rewrite rules.
archiveFiltersIdentifiable custom parameter filtering conditions. However, this method may not be suitable for all scenarios.
- Combining front-end logic:First use: