How to filter and display a specific content list based on the 'recommended properties' of the document?

Calendar 👁️ 75

How to effectively organize and display a large amount of content when operating a website is the key to improving user experience and content value.AnQiCMS (AnQiCMS) offers a very practical feature, that is, to refine the management and filtering of the content list through the 'recommended attributes'.This not only makes the website content more dynamic, but also helps visitors find the information they are interested in more quickly.

Understanding 'Recommended Attributes': A tool for content organization

In Anqi CMS, when we publish or edit documents, we will find an option named 'Recommended Attributes'.This property allows us to tag content with a unique identifier, giving it an additional 'identity' outside of conventional categories and tags.The document lists in detail eight recommended properties and their corresponding single-letter identifiers: such as 'Top News [h]', 'Recommended [c]', 'Slide [f]', 'Special Recommendation [a]', 'Scroll [s]', 'Bold [h]', 'Image [p]', and 'Jump [j]'.These properties are not simple text descriptions, but rather the key basis for front-end template calls.For example, we can mark an important news article as 'Top Story', a premium product as 'Recommended', or a beautiful image as 'Slide', in order to display it specially in different areas of the website.

Through the document editing interface on the backend, we can flexibly select one or more recommended properties for each document.For example, a document can be either a 'headline' or a 'recommendation'.However, it should be noted that when the actual content list is called in the front-end template,Each list can only be filtered and displayed based on one recommended attributeThis means that when designing the page layout and content strategy, we need to clearly define what type of recommended content each content block is intended to display.

How to implement accurate filtering and display on the content list page

Anqi CMS provides a powerfularchiveListThe label, it is the core tool for implementing a content list filter based on recommended properties.This tag allows us to retrieve document lists based on various conditions, including our 'recommended attributes'.

To implement filtering by recommended attributes, we just need toarchiveListIntroduce the tagflagThe parameter, and specify the corresponding single-letter identifier. For example, to display the list of content marked as "recommended" (c), we can write the template code as follows:

{% archiveList recommendedArticles with flag="c" limit="10" %}
    {% for article in recommendedArticles %}
        <a href="{{ article.Link }}">{{ article.Title }}</a>
        {# 这里可以继续展示文章的其他信息,例如摘要或缩略图 #}
    {% endfor %}
{% endarchiveList %}

This code will filter out documents with the 'recommended[c]' attribute from all documents and display the latest 10. Similarly, if you want to display 'slide[f]' type articles, just setflag="c"changed toflag="f"It is. When we need to exclude the content of certain specific properties,archiveListLabels also providedexcludeFlagparameters. For example, if you want to display all content but exclude that marked as "scrolling" (sThe content can be written like this:{% archiveList allContent without excludeFlag="s" %}This provides great flexibility for content display.

Application scenarios: Make the content more attractive.

Understand and apply the 'recommended attributes', which can bring many operating conveniences to the website. Imagine the following scenario:

  • Top area of the homepage:Place one in the most prominent position on the homepage of the website,flag="h"(Top News) content list, attract visitors' eyes at the first time.
  • Slideshow carousel:Utilizeflag="f"Document of (Slide), quickly build a home page carousel to display selected content or products.
  • Sidebar popular articles:Use in the sidebarflag="c"(Recommended) orflag="a"(Special recommendation) article list, recommend high-quality or popular reading content to users.
  • Content topic aggregation:Even if the content is scattered across different categories, as long as you mark specific recommended attributes, it can be aggregated and displayed on a certain special page, such as all lists of

By these strategies, we can flexibly retrieve and present content at different locations on the website according to the importance of the content, the form of display, or the marketing purpose, greatly enhancing the dynamic feel and user stickiness of the website.

Cautionary notes and **practice

In practice, there are several minor details to pay attention to. First, as mentioned before,archiveListtags are being processedflagwhile filtering,only one recommended attribute can be specified at a timeThis means that if you want to display both "Headlines" and "Recommendations" content in the same list area, you need to call them separately twicearchiveListLabel, or set a unified new recommendation attribute for this content in the background (if the system supports custom extended attributes).Secondly, the setting of recommended properties should be clear to avoid abuse leading to content management chaos.Establish a set of internal content recommendation standards, which helps maintain the logicality and consistency of the website content.Finally, remember to regularly check the recommended properties of the content to ensure their timeliness and relevance, for example, an old 'top news' article may need to have the 'top news' attribute removed to make room for new content.

Summary

The 'Recommended Attributes' feature of AnQi CMS provides website operators with powerful content filtering and display capabilities.It broke through the limitations of traditional classification, allowing content operation strategies to be more refined and flexible.Proficiently use this feature,

Related articles

How to display the title, category, time, and other core information on the AnQiCMS document detail page?

Manage website content in AnQiCMS, the document detail page is undoubtedly the core interface for users to obtain information.How to make this page both beautiful and informative is a concern for many website operators.Today, let's talk about how to elegantly display the title, category, publication time, and other key information on the document detail page of AnQiCMS.AnQiCMS uses a syntax similar to the Django template engine, which makes it very intuitive to call various data when customizing templates.

2025-11-08

How to implement a multi-level menu and content联动 display on the AnQiCMS website navigation list?

The website's navigation system is like the skeleton of a building, it not only guides users to browse but also directly affects the exposure of content and search engine optimization.AnQiCMS provides a flexible and powerful navigation management function, allowing you to easily build multi-level menus and achieve deep linkage with website content, thereby enhancing user experience and content distribution efficiency. ### Flexible configuration, build a multi-level navigation skeleton The starting point of implementing a multi-level menu in AnQiCMS is the navigation settings in the background.You can find all configuration items related to website navigation under the 'Background Settings' and 'Navigation Settings' first.

2025-11-08

How to set and display search engine friendly TDK (Title, Description, Keywords) for AnQiCMS pages?

Search engine optimization (SEO) is an indispensable part of website operation, and the Title (title), Description (description), and Keywords (keywords) - abbreviated as TDK - of the website page are the foundation of SEO.They are the first step for search engines to understand page content and a key factor for users to decide whether to click on search results.

2025-11-08

How to dynamically display the contact information of the website in AnQiCMS templates?

In website operation, clearly and accurately displaying the website's contact information is a key link in building trust with users and providing support.A contact method that is easy to find and keep updated, which can not only improve the user experience but also help users find you quickly when necessary.AnQiCMS as an efficient content management system provides a very flexible and intuitive way for you to dynamically display and manage this important information in website templates.

2025-11-08

How to optimize the display and lazy loading of images and videos in document content?

In today's content-driven internet environment, images and videos have become key elements in attracting users and enhancing page interaction.However, they are often the main culprits that lead to slow website loading and a decline in user experience.As users of AnQi CMS, we are fortunate to have a powerful and flexible system that not only efficiently manages content but also has many built-in features to help us cleverly optimize the display of images and videos, and realize smart lazy loading, so that the content can also 'fly' while ensuring visual effects.

2025-11-08

How to extract and display the first image in the document content as a thumbnail?

In website operation, it is a key to enhance click-through rate and optimize user experience to equip each article or product with an attractive thumbnail.However, manually creating and uploading thumbnails for a large amount of content will undoubtedly take a lot of time and effort.Our company, AnQi CMS, is well-versed in this field and provides us with an intelligent and efficient thumbnail processing solution, making website content management easier. ### The Intelligent Thumbnail Mechanism of AnQi CMS The thumbnail processing mechanism of AnQi CMS is very user-friendly.

2025-11-08

How to customize the URL alias of the document and ensure the uniqueness of the front-end link?

The custom document URL alias is an indispensable detail in website operation, it not only concerns the SEO performance of the website, but also directly affects user experience and brand image.In AnQiCMS, you have powerful flexibility to manage these aliases and ensure their uniqueness in frontend links. ### Flexibly define, make URLs more meaningful Imagine, which one is easier to remember and share, a chaotic, disordered URL made up of numbers and symbols, or a clear, meaningful URL that directly reflects the theme of the content?

2025-11-08

How to display the Tag tags and associated documents on the AnQiCMS front-end page?

In AnQiCMS, effectively utilizing the tag feature is a key aspect for improving website content organization, optimizing user experience, and enhancing search engine visibility.Labels can not only help users quickly find the content they are interested in, but also provide website administrators with flexible content classification and association methods, breaking through the hierarchical restrictions of traditional classification.AnQiCMS' tag feature is powerful and flexible, allowing content creators to add descriptive keywords or phrases to articles and products.

2025-11-08