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"