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

Calendar 👁️ 77

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.

Related articles

How to extract and display the thumbnail and cover image of the document content in Anqi CMS?

In AnQi CMS, managing and displaying document content thumbnails and cover images is an important aspect for enhancing the visual effects of a website, optimizing user experience, and improving search engine friendliness.AnQiCMS provides a flexible mechanism to handle these image resources, whether they are automatically extracted from the content or manually uploaded and specified, they can be managed in detail in the background and called through simple template tags on the front end.

2025-11-09

How to ensure that the AnQi CMS website displays content normally on PC, mobile, or adaptive mode?

When building and operating a website, the display effect of content on different devices is crucial to the user experience.AnQiCMS provides a variety of mechanisms and rich features to help users easily cope with the challenges of content display on PC, mobile, and various adaptive scenarios.Understanding and appropriately utilizing these features can effectively ensure that your website content is presented normally and beautifully on any screen.--- ## One, understand the responsive and adaptation mechanism of AnQiCMS AnQiCMS provides flexible options in website modes

2025-11-09

How to set an independent display template for a specific page or content block in AnQi CMS?

In the daily operation of Anqi CMS, we often encounter such needs: certain pages or content need to break away from the unified style of the website and present in a unique way.This could be to highlight an important product, create a dedicated landing page for a special topic event, or simply make the "About Us" page more brand-specific.

2025-11-08

How to optimize the URL structure of Anqi CMS to improve search engine results?

In the world of digital marketing, a website's URL is not just a string of addresses; it is also the key for users and search engines to understand the content of the web page.A well-optimized URL structure not only enhances user experience but also significantly improves the website's crawling and ranking performance by search engines.For those who operate websites using AnQi CMS, using the powerful functions provided by the system to optimize the URL structure is an important step to improve the display effect of search engine results.Why is optimizing URL structure so important?

2025-11-08

How does the custom content model of AnQi CMS affect the display of front-end data fields?

In website content management, flexibility is the key to improving efficiency and user experience.AnQiCMS (AnQiCMS) performs well in this aspect, with its custom content model feature being particularly powerful.It not only makes content management more organized, but also directly affects the way website front-end data is displayed, making it easy for the website to adapt to various content structures and business needs. ### Understanding Custom Content Model One of the core strengths of Anqi CMS lies in its "flexible content model".

2025-11-09

How to set the SEO display rules for article, product, page titles and other content in AnQi CMS?

In website operation, the content title is like the facade of the website, it is not only the first impression seen by visitors, but also an important basis for search engines to understand the content of the page and judge its relevance.A meticulously optimized content title that can significantly improve the click-through rate (CTR) and ranking of the website.AnQiCMS (AnQiCMS) as a highly SEO-friendly content management system, has provided us with very flexible and powerful tools to finely set the SEO display rules for articles, products, pages, and other content. Next

2025-11-09

How to implement flexible navigation menu and submenu display in AnQi CMS template?

In website operation, a clear and intuitive navigation menu is the core of user experience.It can not only help visitors quickly find the information they need, but it is also a direct embodiment of the structure and content organization logic of the website.AnQiCMS (AnQiCMS) leverages its efficient architecture based on the Go language and Django-style template engine to provide great flexibility for content creators and developers, enabling the display of various complex navigation menus and sub-menus.Implement flexible navigation menus and sub-menus in the AnQi CMS template

2025-11-09

How to display dynamic breadcrumb navigation and customize its display in Anqi CMS?

When we browse websites, we often see a line at the top or bottom of the page indicating the current navigation path, which is what we usually call 'Breadcrumbs'.It can not only clearly tell the user the position of the current page in the website structure, but also effectively improve the user experience and search engine optimization (SEO) effect of the website.AnQiCMS (AnQiCMS) is a powerful content management system that comes with a convenient way to generate and customize this dynamic breadcrumb navigation.

2025-11-09