Today, with the content of websites becoming increasingly rich, how to help visitors quickly and accurately find the information they are interested in has become a key challenge in content operation.Imagine if your website had tens of thousands of articles, products, or cases, and visitors could only filter through simple categories and search, that would undoubtedly greatly reduce their exploration efficiency and satisfaction.
AnQiCMS is well-versed in this field and has provided us with a highly efficient and flexible solution - the 'Document Parameter Filtering' feature.This feature acts like an intelligent guide, capable of helping visitors freely combine and filter content lists on the front page according to various preset conditions, thereby greatly enhancing the usability and user experience of the website's content.
What is a document parameter filter? What problems can it solve?
In simple terms, 'Document parameter filtering' allows website administrators to define a series of parameters that users can filter by on the frontend page for specific types of content (such as articles, products).For example, a real estate website can be filtered according to parameters such as "house type" (residential, commercial), "area" (downtown, suburban), "house type" (one bedroom living room, two bedrooms living room), and so on;An online clothing e-commerce website may filter according to 'color', 'size', 'brand', 'season', and so on.
The appearance of this feature perfectly solves the problem of traditional content lists being 'all at once' or 'needle in a haystack'.It converts static content lists into dynamic interactive filters, allowing visitors to quickly focus on the content that best meets their needs, as if using a professional database, through clicking or selecting.This not only improves the efficiency of users finding the information they need, but also makes their browsing experience on the website more smooth and personalized.
How can dynamic filtering be implemented on the front end?
The core of implementing dynamic filtering on the AnQiCMS front end lies inarchiveFiltersTemplate tag. This tag is specifically used to generate user-selectable filter conditions on the document homepage or category list page.
We passarchiveFiltersThe tag defines a variable, for example,filtersand passes in,moduleIdand (specified content model, such as an article or product) andallText(Custom the text of the 'All' option). The system will automatically generate a series of filter options based on the content model configured on the backend.
For example:
{# 参数筛选代码 #}
<div>
<div>参数筛选:</div>
{% archiveFilters filters with moduleId="1" allText="不限" %}
{% for item in filters %}
<ul>
<li>{{item.Name}}: </li>
{% for val in item.Items %}
<li class="{% if val.IsCurrent %}active{% endif %}"><a href="{{val.Link}}">{{val.Label}}</a></li>
{% endfor %}
</ul>
{% endfor %}
{% endarchiveFilters %}
</div>
This code will output a structured filter.filtersThe variable contains the names of each filter parameter (such as "House type", "House size") (Name) corresponding to the field names (FieldName), as well as all the available options under this parameter (Items). Each option is accompanied byLabel(Display text, such as "Residential"),Link(Click to jump to the filter link), as well asIsCurrentIdentify (determine if the current item is selected).
When a visitor clicks on a filter option, such as clicking on 'House Type' under 'Residential', the page URL will automatically update, adding the corresponding filter conditions to the query parameters, for example?house_type=住宅. Even better, if the visitor clicks on "House Size" and then "One Bedroom One Living Room", the URL will continue to add conditions and become?house_type=住宅&size=一室一厅.
And all this "magic" is离不开archiveListThe collaborative work of tags. When we usearchiveListTags to display a list of content, just need totypethe parameter to"page"It will intelligently identify all the filtering parameters in the current URL, and automatically apply them to the query of the content list, then display the corresponding document content according to these combined filtering conditions, and cooperate withpaginationThe tag provides a complete pagination experience.
The "behind the scenes" configuration of the filtering parameters
Of course, these rich and diverse filtering parameters are not out of thin air.They need to be carefully configured in the "Content Model" of the AnQiCMS backend.Enter the "Content Management" under the "Content Model", where we can add exclusive "custom fields" for each model (such as "Article Model", "Product Model", or a custom model).
When adding custom fields, we can choose the field type to be 'Single Selection', 'Multiple Selection', or 'Dropdown Selection'.These field types are naturally suited to be used as front-end filtering criteria.For example, add a field named "House Type" to the real estate model, set the type to "Single Selection", and enter the default values of "Residential, Commercial, Villa", so that these options will be displayed in the front-end filter for user selection.The flexible configuration of the backend is the foundation for the implementation of dynamic filtering on the frontend.
Why is this feature so important?
- Enhance user experience, increase dwell time:Visitors can quickly find the content they need, reducing unnecessary browsing, and naturally, they will be more willing to stay on the website to explore in depth.
- Enhance content discoverability:To uncover information buried in a vast amount of content, it is displayed through multi-dimensional filtering, greatly improving the exposure rate of the content.
- Supports precise marketing and data analysis:By observing the commonly used filtering combinations of users, we can better understand user needs, thus optimizing content production and marketing strategies.
- SEO-friendly:The dynamically generated URL has a clear structure, contains keywords, and helps search engines better understand and crawl page content, thereby improving the search ranking of the website.
- Relieve operational burden:Once the content model and custom fields are configured in the background, the front-end filtering function can run automatically, greatly reducing the manual maintenance and adjustment of the content list.
The 'Document Parameter Filtering' feature of AnQiCMS is an indispensable tool for building modern, user-friendly websites.It not only makes content management more flexible, but also makes every click of visitors filled with the surprise of discovery.
Frequently Asked Questions (FAQ)
How do I set document parameters for front-end filtering in the background?A1: You need to go to the 'Content Management' menu under the AnQiCMS backend and enter the 'Content Model' function.Select the content model you want to add a filter parameter to (for example, 'article model' or 'product model'), then click 'Content model custom field' to add.In here, you can create a new field and set its "field type" to "single choice", "multiple choice", or "dropdown" and fill in the corresponding "default value" as a filter option.
Can I apply multiple filter conditions to the same content list?A2: It is perfectly fine. AnQiCMS's 'Document Parameter Filtering' feature supports combined filtering.When you click a filter condition, the corresponding parameters will be added to the URL. Continue clicking other filter conditions, and the new parameters will be stacked on the URL. The front-end.archiveListTags (whentype="page"It will automatically parse and apply all the filtering parameters in all the URLs, thus displaying content that meets all the conditions.
Q3: What impact does the 'Document Parameter Filtering' feature have on the website's SEO?A3: This feature has a positive impact on SEO.Since the filtering conditions are reflected in the page URL query parameters, search engines can crawl and index these pages that contain specific combinations of filtering conditions.This helps to enhance the richness of the website content and keyword coverage, providing users with more accurate search result entry points.At the same time, a clear URL structure is also more in line with the optimization recommendations of search engines.