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

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.