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,