AnQiCMS (AnQiCMS) is loved by many content operators for its flexible content model and efficient operation capabilities. Today, we will delve into a commonly concerned issue: when we adjust the parameters of the content model in the background, the usage on the frontend page isarchiveFiltersWill the filtering conditions displayed by the tag automatically update?
As an experienced website operations expert, I can clearly tell you that the answer is affirmative:When the AnQi CMS backend content model parameters are adjusted,archiveFiltersthe filter conditions displayed by the tags will be automatically updated.
The core concept and dynamism of AnQi CMS
To understand this, you first need to review the core design concept of Anqi CMS.In the 'AnQiCMS Project Advantages' document, we see that 'Flexible Content Model' is listed as one of the core features.This means that the system has fully considered the variability of content structure from the beginning, allowing users to customize content types and the fields they contain according to business needs.This flexibility is not only reflected in the input and display of content, but also in the dynamic interaction capabilities of the front-end page, such as filtering and sorting.
The strength of AnQi CMS lies in the fact that it does not statically write the background configuration into the front-end template, but rather reads and interprets the latest content model definition in real-time when the page is requested to be rendered. This dynamic rendering mechanism is exactlyarchiveFiltersTags can automatically update their filtering criteria.
archiveFiltersThe principle of operation of tags
archiveFiltersTags (seetag-/anqiapi-archive/145.htmlDocuments) are specifically used to generate filtering conditions based on custom fields of content models on document list pages or category pages.Its design goal is to help users filter combinations based on various 'parameters' (i.e., custom fields).
The document explicitly states:
“Filter parameters are only in list type
type="page"The filter parameters only need to be placed in the URL query parameters.In the additional automatic configuration of the document, the filterable fields are configured, which can be completed by attaching these fields to the query parameters of the URL to filter the document.
This tells us,archiveFiltersThe tag is not generated out of thin air as a filtering condition, but depends on the custom fields defined as "filterable" in the background content model. When the page loads, the tag will query the specified content model (viamoduleIdParameters), get all the custom fields and their preset values (such as radio, checkbox, dropdown options) available under the model.Then, it constructs the front-end filtering interface based on this real-time information.
The implementation mechanism of dynamic response model parameter adjustment
Imagine a scenario: You are running a real estate website and have created a content model named 'Real Estate.'Initially, you may have only defined fields such as 'property type' (e.g., residential, commercial) and 'area' and other fields.This is on your front-end page,archiveFiltersLabels will generate corresponding filter options based on these fields.
If one day you decide to add a field named "house type" and in the "content model usage help" in the background(help-content-module.md) It has set preset values such as "one bedroom and one living room", "two bedrooms and two living rooms", and so on. Once these changes are saved and take effect, when the user visits the property list page again:
- The Anqi CMS template engine encounters an issue while rendering the page
archiveFilters. archiveFiltersThe tag will query the latest definition of the “Real Estate” content model from the system.- The system returns the updated model definition, which includes the newly added 'House Type' field and all its preset options.
archiveFiltersTags based on these real-time data dynamically generate new "house type" filtering conditions on the page and display options such as "1 bedroom 1 living room", "2 bedrooms 2 living rooms", and so on.
The entire process is automatically completed, no manual modification of template code is required, nor is any additional configuration refresh needed.This seamless connection experience greatly enhances the efficiency and flexibility of content operation.
Summary
Of Security CMSarchiveFiltersLabels can automatically and dynamically update the displayed filtering conditions, which is thanks to its underlying flexible content model architecture and real-time rendering mechanism.Content operators only need to adjust the content model (especially custom fields) in the background, and the filtering function on the front-end page will respond immediately, displaying the latest filtering dimensions and options.This design greatly reduces the operation and maintenance costs and ensures that the display and filtering of website content always maintain consistency and the latest information.
Frequently Asked Questions (FAQ)
1. I modified the parameters of the content model in the background, but the front-end pagearchiveFiltersWhy did the displayed filter conditions not update immediately?
This situation is usually caused by browser caching. Although the Anqi CMS backend updates data in real time, your browser may be loading an old cached page.Try clearing the browser cache or force refresh the page (usually Ctrl+F5 on Windows, Cmd+Shift+R on Mac) to see the updated filter conditions.If the problem still exists, it may be due to some caching mechanisms on the server side, at this time, you can try to click the "Update Cache" feature in the Anqi CMS backend to clear the system cache.
2.archiveFiltersDoes the tag display the filtering conditions of all custom fields in the content model?
Not necessarily.archiveFiltersLabels will display those custom fields configured as 'filterable' in the content model.Generally, when the backend defines custom fields, there will be an option to control whether the field appears in the frontend filter.This means that even if you add custom fields, you need to ensure that their "filterable" property is enabled so that you canarchiveFiltersSee in the middle.
3. If my custom field has many different values (such as text boxes),archiveFiltershow will these filtering conditions be handled?
archiveFiltersThe label is mainly aimed at field types with clear, limited options (such as radio buttons, checkboxes, dropdown selections) to generate visual filtering conditions. For custom fields of free text input type,archiveFiltersIt is usually not generated in the form of drop-down or checkbox filters, but expected through the URL'squeryParameters are passed directly to filter keywords. This means that filtering for such fields may require you to manually construct a URL or use a search box.The document mentions that 'the filtering parameters only need to be placed in the URL query parameters' also implies this processing method.