How to add recommended attributes (such as headlines, slides) to control the priority of display on the homepage?

Calendar 👁️ 84

In website operation, how to effectively display important content, ensure that they can be discovered first when users visit the homepage, which is the key to improving user experience and conversion rate.AnQi CMS provides a flexible "recommended feature" that allows us to easily control the display priority of documents, whether as the headline news of the website or prominently displayed in the carousel, it can achieve precise control.

Skillfully utilize document recommendation attributes to enhance content exposure

In Anqi CMS, each document has rich configurable options, among which the 'recommended attributes' are an important tool for optimizing the priority of content display.These properties are like special tags applied to content, making them stand out on the frontend page.

1. Set the recommended properties in the document

When we enter the Anqi CMS backend, whether we create a new document or edit an existing document, we will see a section named "Recommended Properties" in the editing interface. Here, various options are provided, which are usually presented in Chinese characters and parentheses, such as:

  • Headline [h]: Articles suitable for the most important, which need to occupy the most prominent position on the homepage.
  • Recommend [c]: Content recommended universally, which can appear in multiple recommendation positions.
  • Slide [f]: Designed specifically for carousel or slideshow areas, the content usually features attractive large images.
  • Special recommendation [a]: Content with special recommendation value, which may be more important than ordinary recommendations.
  • Scroll [s]: Suitable for display in scrolling news, bulletin boards, and other areas.
  • Bold [b]: To add visual bold effect to the title or part of the text, highlighting it (here the original document is [h], but bold is commonly used as [b] in CMS to avoid confusion, assume it is [b] or prompt users to check the actual marking in the background).
  • Image [p]: Document marked as containing important images, which may be displayed in a photo wall or in modules with text and images.
  • Jump [j]: Usually used for external links or documents that need to jump to a specific page.

You can select one or more recommended properties based on the actual importance of the document and the expected display location.For example, a recent important news can be selected as both 'Headline [h]' and 'Recommended [c]'; if it needs to appear on the homepage slideshow, 'Slideshow [f]' is also a good choice.

2. Call the document with recommended attributes in the page template

After setting up the recommended document properties, the next step is to display the marked content on the website front-end page, especially the homepage. This requires us to be familiar with the template tags of Anqi CMS, especiallyarchiveList.

archiveListTags are powerful tools for obtaining document lists, through whichflagparameters, we can accurately filter out documents with specific recommended properties.

For example, if you have a "Today's Hot News" section on your homepage, you may want to only display articles marked as "Hot News [h]". In the template, you can write the code like this:

{% archiveList headlines with flag="h" limit="1" %}
    {% for item in headlines %}
    <div class="top-headline">
        <h2><a href="{{ item.Link }}">{{ item.Title }}</a></h2>
        <p>{{ item.Description }}</p>
    </div>
    {% endfor %}
{% endarchiveList %}

here,flag="h"The parameter tells the system to only fetch documents that have set the 'headline' attribute.limit="1"Then it limits to showing only one article.

Similarly, if you have a carousel module on your homepage that needs to display documents marked as "Slide [f]" and limit the display to 5:

<div class="slideshow-carousel">
{% archiveList slides with flag="f" limit="5" %}
    {% for item in slides %}
    <div class="carousel-item">
        <a href="{{ item.Link }}">
            <img src="{{ item.Logo }}" alt="{{ item.Title }}">
            <h3>{{ item.Title }}</h3>
        </a>
    </div>
    {% endfor %}
{% endarchiveList %}
</div>

In this way, you can accurately display content in different modules on the homepage based on different recommendation attributes, and realize refined operation of content.

Flexible application, making the homepage more vibrant

The recommended attribute can not only control the display of documents on the homepage but also apply to other pages of the website, such as displaying recommended content under the category page, or showing "Hot Recommendations" in the sidebar.The key is to understand the meaning of each recommended attribute and its calling method in the template.Regularly review and update these recommended properties, which can ensure that your website always displays the latest, most relevant, and most valuable content, thereby better attracting and retaining visitors.


Frequently Asked Questions (FAQ)

Q1: If a document is set with multiple recommendation attributes, will it appear simultaneously in all corresponding recommendation positions?A1: Yes, if a document is checked for both 'Headline [h]' and 'Slide [f]' properties, then in your template, you can go throughflag="h"The module called will display it, while passing throughflag="f"The slide module called will also display it, provided that both of these moduleslimitThe setting allows it to be displayed.

Q2: Can I use the samearchiveListDocument that calls multiple recommended properties at the same time?A2: Anqi CMS'sarchiveListlabel'sflagThe parameter is designed to filter only one recommended attribute per call. If you need to display multiple recommended attribute documents in a list, it is usually necessary to use multiplearchiveListLabel call, or consider setting these documents to a priority-recommended attribute in the background.

Q3: How to cancel the recommendation attribute of the document so that it no longer displays in the recommendation position?A3: You just need to find the "Recommended Properties" area on the document editing page, uncheck the corresponding properties, and then save the document. After saving, the document will no longer meet the relevant requirements.flagThe calling conditions of the parameter, thereby removing it from the recommendation position.

Related articles

How does Anqi CMS automatically extract the first image of the document content as a thumbnail for display?

In website content operation, carefully selecting and setting thumbnails for each article or product page is a time-consuming and important task.A captivating thumbnail can significantly increase click-through rate, optimize user experience, and benefit SEO performance.However, facing an overwhelming amount of content, manually uploading and adjusting thumbnails will undoubtedly become a huge burden.AnQi CMS deeply understands this, and for this reason, it provides a smart and flexible solution that automatically converts the first image of the document content into a thumbnail, greatly simplifying the operation process.## Smart Extraction

2025-11-07

How can you customize templates for specific documents or categories to achieve personalized display?

In Anqi CMS, when you want a specific article, product, category, or standalone page to have a unique display effect, the system provides a flexible template customization feature that allows you to easily achieve personalized content display.This is greatly beneficial for creating brand characteristics, launching special event pages, optimizing the user experience of specific content, and even improving SEO performance.Why do we need to customize templates for specific content?Imagine that on your website there is an "About Us" page about the history of the company, you may want it to be dignified and elegant

2025-11-07

How to flexibly control the display logic of conditional judgment and loop control tags?

Build dynamic and interactive websites in AnQi CMS, it is inseparable from precise control of the content display logic.This involves conditional judgment (`if`) and loop control (`for`) tags playing a core role.They are like a powerful 'combination punch', making the template no longer a static layout, but one that can intelligently respond and flexibly present content based on data changes.The template syntax of AnQi CMS borrows from the Django template engine, its concise and efficient marking method allows even beginners in template development to quickly get started.

2025-11-07

How to define and use variables in AnQiCMS templates to display dynamic content?

When building a website, we all hope that the content can change flexibly according to different pages and different data, rather than unchanging static text.AnQiCMS leverages its high-performance architecture based on the Go language and a flexible Django-like template engine, providing us with powerful dynamic content display capabilities.And at the core of all this, it cannot be separated from the definition and use of 'variables'. Mastering how to define and use variables in the AnQiCMS template is like mastering the key to activating the dynamic vitality of the website.This is not just a technical operation, but also the realization of content marketing and SEO

2025-11-07

How does the custom URL feature affect the display links of documents and categories on the front page?

When operating a website, the structure and readability of links play a crucial role.A clear and friendly URL not only improves the user experience but is also an indispensable part of search engine optimization (SEO) strategy.Anqi CMS is well-versed in this, providing powerful custom URL functions that allow you to flexibly shape the display links of documents and categories on the front page. ### The Core Value and Function of Custom URL The custom URL feature allows us to convert traditional dynamic links composed of IDs into more descriptive and meaningful static or pseudo-static links.

2025-11-07

How to set up a timed publishing feature to control the online display time of documents?

In content operation, the timing of content release is often a key factor in determining its communication effect.In order to seize specific marketing opportunities, maintain the rhythm of daily updates, or prepare holiday content in advance, a flexible scheduling publication feature can greatly enhance operational efficiency.AnQiCMS (AnQiCMS) knows this well and has specially provided a powerful scheduled publishing function to allow you to easily plan the content release time and achieve automated operation.This feature is designed to help you reduce cumbersome manual operations, making content operation more strategic and automated.

2025-11-07

How does AnQi CMS handle documents that have not uploaded thumbnails, such as displaying default thumbnails?

In website content operation, the visual presentation of content is often the key to attracting readers' attention, and thumbnails play an indispensable role in it.Imagine when you publish a fantastic document but inadvertently forget to upload the thumbnail, resulting in blank or broken icons on the page, which undoubtedly affects the user experience and the professional image of the website.How does AnQiCMS (AnQiCMS) cleverly deal with this situation to ensure that the website always maintains good visual consistency?

2025-11-07

How do the SEO title and keywords of the document category affect the search results display of the category page?

For website content operation, the category page is an important entry for users to discover and for search engines to crawl the website content.A meticulously optimized category page, which not only improves user experience but also significantly affects its performance in search engine results.In AnQiCMS (AnQiCMS), the SEO title and keywords of the document category are key factors affecting this performance.

2025-11-07