How to use document recommendation properties to implement content display classification on the front end when adding a new document (such as headlines, recommendations)?

Calendar 👁️ 55

AnQiCMS (AnQiCMS) as an efficient and customizable content management system, provides website operators with a wealth of content management tools.The "Document Recommendation Attributes" feature is the key to fine-grained content display.It allows operations personnel to mark documents with specific tags in the background, thereby flexibly categorizing and presenting content through the front-end template, such as setting important news as 'headlines' or listing selected articles as 'recommendations'.

Backend settings: Add recommended properties to the document

On the Anqi CMS backend management interface, content publishing and editing is the core link of website operation.When you create a new document or edit an existing document, you will find the important option of "recommended properties".This feature aims to allow operation personnel to assign specific content classification tags to each document, thereby realizing differentiated display on the website front-end.

The specific operation procedure is as follows: Navigate to the 'Content Management' module, select 'Publish Document' or click on an existing document to edit.In the document editing page, you will find a section named "recommended properties".This lists eight predefined attribute tags, you can check them according to the nature of the content and the expected front-end display effect.

  • Headline[h]This attribute is usually used to mark the most time-sensitive and important content on a website, which often occupies the most prominent position on the homepage to attract the primary attention of users.
  • Recommended[c]: Suitable for those who want to promote selected content on various recommended positions of the website (such as sidebars, article ends), aiming to increase the exposure rate and click-through rate of the content.
  • Slide[f]: Designed specifically for the homepage or specific page carousel, focus image area.Documents marked as 'slides' will have their titles and thumbnails displayed as visual elements in these areas in a loop.
  • Special recommendation[a]: It indicates content that is particularly recommended, which may have higher importance or attention than ordinary recommendations. It is often used to highlight specific themes, events, or in-depth articles.
  • Scroll[s]: Suitable for website scrolling news, bulletin boards, or rapid information streams, allowing content to be presented to users in a dynamic and concise manner.
  • Bold[h]: This attribute is intended to emphasize the document title in the text list, displaying it in bold style to highlight and make it stand out.Please note that both 'headline' and 'bold' are used in the document.[h]As an identifier, please distinguish according to the actual behavior of the system or template definition in practice.
  • Image[p]: Mark this document as containing important image resources, often used to build image news, mixed-text layout recommendation modules, or for special display in image libraries.
  • Jump [j]Indicates that the document may contain an external link or requires special internal jump handling. The front-end template can handle the link behavior specifically when parsing this property.

The operation staff can flexibly select one or more recommended properties based on the importance of the document content and the front-end display strategy.These properties are simply metadata identifiers for the content in the background, and their specific visual and interactive presentation is completely determined by the frontend template through specific tags for parsing and rendering.

Front-end display: Use recommendation attributes to implement content classification call

In AnQi CMS, the content display of the front-end page is realized through its powerful template tag system. The core mechanism lies in the clever use of the recommended attributes set for the document in the background to fully utilize the diversified content classification display on the front-end.archiveListtags and theirflagParameter.

archiveListThe tag is a general and powerful tool used in AnQi CMS to retrieve document lists.It can filter, sort, and retrieve document content based on various preset conditions.When you need to display a document with specific recommended properties in a certain area of the website, just inarchiveListConfigure in tagflagAnd specify the letter identifier for the recommended attribute.

For example, if you want to build a prominent "Headline News" area on the homepage of the website, dedicated to displaying important documents marked as "Headline" in the background, you can write the code like this in the frontend template:

<section class="top-headlines">
    <h2>网站头条</h2>
    <div class="articles-list">
        {% archiveList topNews with flag="h" limit="5" %}
            {% for article in topNews %}
                <article>
                    <h3><a href="{{ article.Link }}">{{ article.Title }}</a></h3>
                    <p>{{ article.Description|truncatechars:100 }}</p>
                    <time>{{ stampToDate(article.CreatedTime, "2006-01-02") }}</time>
                </article>
            {% empty %}
                <p>当前暂无头条新闻发布。</p>
            {% endfor %}
        {% endarchiveList %}
    </div>
</section>

The above code will filter out up to 5 documents with the attribute

Similarly, if your website sidebar needs to display "recommended reading" content to guide users to more selected articles, you can use `flag="c"

Related articles

How to specify a detailed template for all documents under a category?

As an experienced website operator familiar with Anqin CMS, I fully understand your pursuit of efficiency and consistency in content management.Uniformly specify the detail template for all documents under the category, which not only ensures the unified style of website content display, but also greatly simplifies the follow-up operation and maintenance work.The AnQi CMS provides intuitive and powerful functions, allowing you to easily achieve this goal.The significance of a unified document template in website operation is the key to improving user experience and brand image.

2025-11-06

Does the Anqi CMS document classification support uploading Banner images and thumbnails? How to call them on the front end?

As a website operator deeply familiar with the essence of Anqi CMS content management, I know the importance of image content in attracting and retaining users.Regarding your concern about whether Anqi CMS supports uploading Banner images and thumbnails for document categories, and how to call these resources on the front end, I can clearly tell you that Anqi CMS provides comprehensive support for this and has flexible front-end calling methods.### Picture Support Function of AnQi CMS Document Classification AnQi CMS has fully considered the diversity of website content display needs since its design

2025-11-06

How to set a custom template for a specific document category and control whether subcategories inherit the template?

As a professional who is deeply familiar with the operation of AnQi CMS, I know the importance of content presentation in attracting and retaining users.The flexibility of AnQi CMS in content management, especially in template customization, provides us with great freedom, ensuring that every part of the content can be displayed in the most fitting way according to its characteristics.Today, I will elaborate on how to set up a custom template for a specific document category, and flexibly control whether the subcategories inherit the template, thereby helping you create a more personalized and professional website.Why do you need a custom category template? In website operation

2025-11-06

How does AnQi CMS support custom document category URL aliases, and what are the naming rules?

As an experienced CMS website operations personnel in a well-known security company, I am well aware that a flexible and search engine-friendly URL structure is crucial for the success of the website.AanQi CMS provides strong support in this aspect, especially for the custom URL alias feature for document classification, which greatly improves the website's SEO performance and user experience. ### Support and Function of Custom Document Category URL Aliases Anqi CMS, as an enterprise-level content management system developed in Go language, took SEO friendliness into account from the very beginning of its design.Among, the article

2025-11-06

How can the keywords of the document be managed and selected efficiently, and does it support a keyword library?

As an experienced CMS website operation person in the security industry, I know the core status of keywords for website content marketing and SEO optimization.Effective keyword management not only enhances content visibility, but is also crucial for attracting target users and improving conversion rates.AnQi CMS provides a powerful and flexible solution in this field, significantly improving my daily operational efficiency.

2025-11-06

What rich text editing features does the Anqi CMS document content editor support, such as the material library, image and video insertion?

As an experienced CMS website operation personnel of a security company, I know that content creation is the core of website operation.An efficient and comprehensive content editor is crucial for improving content production efficiency and quality.AnQi CMS is well-versed in this, its built-in content editor integrates a variety of rich text editing features, aiming to provide convenient and powerful tools for content creators, ensuring that they can easily publish high-quality website content.The Anqi CMS content editor provides a comprehensive and intuitive rich text editing environment for content creators.

2025-11-06

How to set up the scheduled publication function of the document, to realize automated content going online?

As an experienced CMS website operation personnel of an enterprise, I am well aware of the key role of content publishing efficiency and strategic planning in the success of the website.In daily work, the automated deployment of content not only saves valuable human resources, but also ensures the sustainability and accuracy of website content updates, thereby effectively attracting and retaining users.Aqin CMS provides a very practical feature - scheduled document release.

2025-11-06

How is the custom URL alias of the document automatically generated? What should be paid attention to when manually setting it?

As an experienced CMS website operation person in the security industry, I am very clear about the key role of custom URL aliases in website SEO and user experience.In Anqi CMS, the management of URL aliases has both an intelligent automatic generation mechanism and provides flexible manual setup options.The automatic generation mechanism of custom URL aliases in AnQi CMS

2025-11-06