How to use the recommended attributes of Anqi CMS (such as headlines, sliders) to control the display of homepage content?

When building and maintaining a website, the homepage is undoubtedly the first stop for users visiting, and the way its content is presented directly affects user experience and information communication efficiency.A carefully planned and flexible homepage layout that can effectively attract visitors, guide traffic, and highlight the core value of the website.AnQiCMS (AnQiCMS) provides a series of powerful content recommendation features, allowing you to easily manage the dynamic display of home page content and meet various operational needs.

Flexible use of the recommendation attributes of AnQi CMS

AnQi CMS provides rich recommendation attributes for each document (whether it is an article or a product) in content management.These properties, such as '头条', '幻灯' and so on, are like individual content tags. You can mark them with different tags according to the characteristics of the content and the layout requirements of the homepage.This means that you can use these tags to fetch and display specific content in different areas of the homepage, achieving refined operation of the homepage.

When you add or edit documents in the background, you will see multiple options in the "recommended properties" area, which are usually identified by letters, such as:

  • Headline [h]:Commonly used for the most core and important news or articles on a website.
  • Recommend [c]:Widely used in various recommendation slots, such as sidebar recommendations and featured articles in the article list.
  • Slideshow [f]:The ideal carousel content source, usually displayed in a large-size area at the top of the website.
  • Special recommendation [a]:Content for special recommendation, priority may be between headlines and general recommendations.
  • Scroll [s]:Suitable for news scrollbars or bulletin boards and other areas that require continuous updates and display.
  • Image [p]:Content with high-quality images is emphasized, often used in recommended modules with text and image layout.
  • Jump [j]:If the content needs to jump directly to an external link instead of a detail page, you can use this attribute.

The strength of these properties lies in the fact that they are not mutually exclusive. A document can have both 'Headline' and 'Slide' properties at the same time, which provides great flexibility for content reuse on the homepage and multi-dimensional display.

How can you control the display of the home page content through recommended properties?

Implement dynamic control of the home page content, mainly through the template tags of Anqi CMSarchiveListTo complete. This tag allows you to filter and retrieve documents based on different parameters, among whichflagThe parameter is the key.

For example, if you want to display the latest 'headlines' at the top of the homepage:

{# 假设这是首页的某个区域,用于展示头条新闻 #}
<div class="headline-news">
    <h2>今日头条</h2>
    {% archiveList headlines with type="list" flag="h" limit="1" order="id desc" %}
        {% for item in headlines %}
            <a href="{{item.Link}}">
                <img src="{{item.Logo}}" alt="{{item.Title}}">
                <h3>{{item.Title}}</h3>
                <p>{{item.Description}}</p>
            </a>
        {% endfor %}
    {% endarchiveList %}
</div>

In this code block,flag="h"It accurately filtered out the content marked as 'headlines'.limit="1"Then the control only displays the latest one.

For example, you may want to have a large-size image slideshow (slide show) on the homepage to attract users' attention:

{# 首页轮播图区域 #}
<div class="slideshow-banner">
    {% archiveList slides with type="list" flag="f" limit="5" order="id desc" %}
        {% for item in slides %}
            <a href="{{item.Link}}">
                <img src="{{item.Images[0] or item.Logo}}" alt="{{item.Title}}"> {# 优先使用组图第一张,否则使用Logo #}
                <div class="caption">
                    <h3>{{item.Title}}</h3>
                    <p>{{item.Description}}</p>
                </div>
            </a>
        {% endfor %}
    {% endarchiveList %}
</div>

Here, we useflag="f"To retrieve the "slide" content and throughlimit="5"To limit the number of slides.ImagesThe field is usually used for multiple image uploads, and here it cleverly gets the first image.

If your website sidebar needs a 'Recommended Reading' list, or a special topic page needs 'Featured Articles', the operational logic is similar:

{# 侧边栏推荐阅读 #}
<div class="sidebar-recommend">
    <h4>推荐阅读</h4>
    <ul>
        {% archiveList recommends with type="list" flag="c" limit="10" order="views desc" %}
            {% for item in recommends %}
                <li><a href="{{item.Link}}">{{item.Title}}</a></li>
            {% endfor %}
        {% endarchiveList %}
    </ul>
</div>

{# 某个专题页面的特荐文章 #}
<div class="featured-articles">
    <h3>本周特荐</h3>
    {% archiveList specialFeatures with type="list" flag="a" limit="3" order="id desc" %}
        {% for item in specialFeatures %}
            <div class="article-card">
                <a href="{{item.Link}}">{{item.Title}}</a>
                <span>发布日期:{{stampToDate(item.CreatedTime, "2006-01-02")}}</span>
            </div>
        {% endfor %}
    {% endarchiveList %}
</div>

Through these flexibleflagProperty, you can set corresponding recommended properties for different content according to the design requirements of the website, and then pass through the front-end template.archiveListLabel them accurately to achieve personalized and dynamic display of content on the homepage and other key pages.

Content operation strategy and practice suggestions

Mastered the technical implementation, what is more important is how to integrate these functions into the actual content operation strategy:

  1. Regular updates and maintenance:The timeliness of recommended content on the homepage is crucial. It is recommended to regularly check and update content with high priority attributes such as 'headline' and 'slider' to ensure that visitors see fresh and relevant information every time they visit.
  2. Distinguish content priorities:Different recommended attributes represent different importance or display forms.For example, set the most important event as 'Top News', the latest product release as 'Slide', and the evergreen content as 'Recommended' to be displayed in the sidebar for a long time.
  3. Combined with data analysis:Using the built-in traffic statistics function of Anqi CMS, analyze which recommended content is most popular and which content has a high click-through rate.Based on data feedback, adjust recommendation strategies, optimize content selection and layout.
  4. Guide the user path:Reasonably plan recommended content, which can guide users to explore the website in depth.For example, link the 'Top News' on the homepage to the special page, and then link to the specific product or article details through the 'Featured' link on the special page, forming a clear user conversion path.
  5. A/B testing:Under the circumstances allowed, you can try to perform A/B testing on the content combinations or layouts of different recommended attributes to find the scheme that best attracts users and improves conversion effectiveness.

The recommended features of Anqi CMS provide powerful tools for website operation, making the display of home page content no longer static and unchangeable, but instead can be flexibly adjusted according to operational objectives and user feedback.Make effective use of these properties to enhance the attractiveness, user activity, and overall operational effectiveness of the website.


Frequently Asked Questions (FAQ)

1. How do I set up to display both headline and recommended content in an area?

You canarchiveListlabel'sflagIn the parameters, multiple recommended properties are called simultaneously by separating them with commas. For example,flag="h,c"The document with the attributes 'Headline' or 'Recommendation' will be retrieved. The system will display the documents in reverse order of document ID or other specified sorting method, and you can also use multiplearchiveListLabel respectively retrieve and merge for display.

2. Will the recommended attribute affect the SEO weight of the content?

The recommended attribute is the internal display control mechanism of AnQi CMS, which will not directly affect the SEO weight of the content.The SEO weight is mainly affected by factors such as content quality, keyword matching, external links, internal link structure, and page loading speed.However, by optimizing the home page content display through recommendation attributes, it can enhance user experience, increase user stay time and click-through rate on the website, and these positive user behavior signals will indirectly have a positive impact on SEO.

3. Can single-page content also set recommended attributes, in addition to articles and products?

According to the Anqi CMS documentation, recommended properties are typically for "documents", which include articles and product content models and documents.Single pages (such as "About Us", "Contact Us", etc.) usually have their own independent management methods, and their content is often fixed and independent, not suitable for dynamic display through recommendation properties.If you need to add a display similar to recommended positions on a single page, you may need to customize development or utilizepageListThe label combines other filtering logic to achieve this.