How to help visitors quickly and accurately find the information they are interested in, has become a key challenge in content operation in today's increasingly rich website content.Imagine if your website has thousands of articles, products, or cases, and visitors can only filter them through simple categorization and search. This would undoubtedly greatly reduce their exploration efficiency and satisfaction.

AnQiCMS is proficient in this field and provides us with a highly efficient and flexible solution — the "Document Parameter Filtering" feature.This feature acts like an intelligent guide, which can help visitors freely combine and filter the content list on the front page according to the various conditions we set, thereby greatly enhancing the usability and user experience of the website.

What is 'Document Parameter Filtering'? What problems can it solve?

In simple terms, 'Document Parameter Filtering' allows website administrators to define a set 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 by parameters such as 'property type' (residential, commercial), 'area' (downtown, suburban), 'house type' (one bedroom living room, two bedrooms living room), etc.; a clothing e-commerce website may be filtered by 'color', 'size', 'brand', 'season', etc.

The appearance of this feature perfectly solves the problem of traditional content lists being 'too obvious' or 'difficult to find'.It converts static content lists into dynamic interactive filters, allowing visitors to quickly focus on the content that best meets their needs by clicking or selecting, just like using a professional database.This not only improves the efficiency of users finding the information they need, but also makes their browsing experience on the website smoother and more personalized.

How to implement dynamic filtering on the front end?

The core of implementing dynamic filtering in AnQiCMS lies inarchiveFiltersTemplate tag. This tag is specifically used to generate selectable filtering conditions for the document homepage or category list page.

We go througharchiveFiltersDefine a variable, such asfiltersand pass inmoduleId(Specify the content model, such as articles or products) andallText(Customize 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.filtersEach parameter (such as “House Type”, “House Size”) in the variable contains the name (Name) of the corresponding field (FieldName),as well as all the available options under this parameter (Items). Each option is accompanied byLabel(Display text, such as "Residential"),Link(Link to filter after click), as well asIsCurrentIdentifier (determine whether the current item is selected).

When the 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=一室一厅.

All of this 'magic' cannot be separated fromarchiveListLabel collaboration. When we usearchiveListlabels to display content lists, just need totypeparameter settings"page",它就会智能地识别当前 URL 中的所有筛选参数,并自动将其应用到内容列表的查询中,然后根据这些组合筛选条件来展示对应的文档内容,并配合paginationLabel provides a complete pagination experience.

The "behind the scenes" configuration of the filter parameters.

Of course, these rich and diverse filtering parameters did not come from nowhere.They need to be carefully configured in the "Content Model" of AnQiCMS.Enter "Content Management" under "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 fields are naturally suited to be used as frontend filtering conditions.For example, add a field named 'House Type' to the real estate model, set the type to 'Single Selection', and fill in the default value with 'Residential, Commercial, Villa'. This way, these options will be displayed in the front-end filter for user selection.The flexible configuration of the background is the foundation for the realization of dynamic filtering on the front end.

Why is this feature so important?

  1. Enhance user experience, increase dwell time:Visitors can quickly find the content they need, reducing unnecessary browsing, and they will naturally be more willing to stay on the website to explore in-depth.
  2. Enhance the discoverability of content:Translate information buried in massive content, and display it through multi-dimensional filtering, greatly improving the exposure rate of content.
  3. Support precise marketing and data analysis:Through observing the common filter combinations used by users, we can better understand user needs, thus optimizing content production and marketing strategies.
  4. SEO-friendly:The dynamically generated URL structure is clear, contains keywords, and helps search engines better understand and crawl page content, thereby improving the search ranking of the website.
  5. Reduce 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 work of the content list.

AnQiCMS's 'Document Parameter Filtering' feature 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.


Common Questions (FAQ)

Q1: How to set document parameters available for front-end filtering in the background?A1: You need to go to the "Content Management" menu under the AnQiCMS backend to enter the "Content Model" function.Select the content model you want to add filtering parameters (for example, "Article Model" or "Product ModelHere, you can create new fields, and set the 'field type' to 'single selection', 'multiple selection', or 'dropdown selection', and fill in the corresponding 'default value' as filter options.

Q2: Can I apply multiple filtering conditions to the same content list?A2: Perfectly fine.The "Document Parameter Filtering" function of AnQiCMS supports composite filtering.When you click a filter condition, the corresponding parameter will be added to the URL. Continue clicking other filter conditions, and the new parameters will be added to the URL.archiveListTags (whentype="page"The content that matches all conditions will be automatically parsed and applied to all URL filtering parameters.

Q3: “Document parameter filtering” function has what impact 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 filtering condition combinations.This helps to enhance the richness of website content and keyword coverage, providing users with more accurate search results.At the same time, a clear URL structure also conforms to the optimization recommendations of search engines.