How to display the AnqiCMS related document list on the front page to increase content relevance and user stay time?

Calendar 👁️ 63

In content operation, we all hope that users can stay longer on the website and browse more content.A well-written article is indeed important, but how to connect it with other relevant content to form a content matrix is the key to improving user experience and reducing the bounce rate.Imagine, after reading an article about 'AnQi CMS core features', if the page below can automatically recommend 'How to use AnQi CMS to build an e-commerce site' or 'AnQi CMS template creation tutorial', wouldn't it be more attractive to encourage them to continue exploring?

This is the topic we are discussing today: how to cleverly display the list of related documents on the front page of Anqi CMS, which can not only increase the relevance of the content but also effectively extend the user's stay on the website.

Why is it so important to display relevant documents?

It is not enough to just publish content when we are building website content.To maximize the value of each piece of content, we need to think about how to guide users to discover more.

  1. Improve user experience:Users who finish reading an article will feel convenient and considerate if they can immediately see the next step they might be interested in reading, this seamless guidance will make them feel convenient and considerate.
  2. Reduce bounce rate:When users find the relevant content they are interested in, they will not easily leave the website but continue to click and browse, thereby effectively reducing the website's bounce rate.
  3. Extend dwell time and increase page views:More clicks mean longer dwell time and more page views, which is crucial for the overall data performance of the website.
  4. Optimize SEO (Search Engine Optimization):Internal links are an important component of SEO.By reasonably recommending relevant content in the article, we can build a strong internal link structure, helping search engines better understand the theme of the website and improve the weight and ranking of the page.

The secret weapon of AnQi CMS:archiveListTag

AnQi CMS provides a powerful and flexible template tag system, where,archiveListLabels are a powerful tool for achieving content association and display.It can help us dynamically pull and display document lists based on various conditions such as categories, tags, recommended attributes, even custom fields.

Make good use ofarchiveListLabel, we usually need to first obtain the context information of the current page, such as the document ID being viewed by the user, the category ID, keywords, etc.archiveDetailLabels can help us complete the task well.

1. Get the context information of the current document.

Suppose we are on a document detail page (such asdetail.htmlorproduct/detail.htmlFirstly, it is necessary to obtain specific information about the current document in order to find relevant content later.

{# 假设我们正在文档详情页,archive变量已包含当前文档的所有信息 #}
{# 如果没有,可以使用 archiveDetail 标签来获取,例如:#}
{# {% archiveDetail currentArchive with name="Id" %} #}
{# {% set currentArchiveId = currentArchive %} #}
{# {% archiveDetail currentArchive with name="CategoryId" %} #}
{# {% set currentCategoryId = currentArchive %} #}

{# 实际开发中,通常在详情页,archive 变量是默认可用的,我们直接使用它 #}
{% set currentArchiveId = archive.Id %}
{% set currentCategoryId = archive.CategoryId %}
{% set currentArchiveKeywords = archive.Keywords %}

Thus, we have the ID, category ID, and keywords of the current document, which are important bases for constructing the list of related documents.

2. Display related documents according to different strategies.

Now, we can make use ofarchiveListtags, combined with different parameters, to implement various display strategies for related documents:

Strategy one: other documents under the same category

This is the most common and direct association method. Since the user is interested in the content of this category, they are likely to want to see other articles in the same category.

<section class="related-docs-by-category">
    <h3>同分类下其他文章</h3>
    <ul>
        {% archiveList relatedByCategory with type="list" categoryId=currentCategoryId limit="5" %}
            {% for item in relatedByCategory %}
                {# 避免显示当前文章本身,虽然安企CMS通常会智能处理,但手动判断更保险 #}
                {% if item.Id != currentArchiveId %}
                <li>
                    <a href="{{ item.Link }}">
                        {% if item.Thumb %}<img src="{{ item.Thumb }}" alt="{{ item.Title }}" loading="lazy">{% endif %}
                        <h4>{{ item.Title }}</h4>
                        <p>{{ item.Description|truncatechars:80 }}</p>
                    </a>
                </li>
                {% endif %}
            {% empty %}
                <li>暂无同分类下其他文章。</li>
            {% endfor %}
        {% endarchiveList %}
    </ul>
</section>

Strategy two: Based on keywords or manually associated documents

Of Security CMSarchiveListThe label is very practicaltype="related"A parameter that can intelligently recommend based on the keywords of the current document, even documents set by manual settings in the background.

<section class="related-docs-by-keywords">
    <h3>您可能还喜欢(根据内容相关性)</h3>
    <ul>
        {# type="related" 会根据当前文档的分类和关键词智能匹配,
           如果后台人工设置了相关文档,like="relation" 会优先展示人工关联的 #}
        {% archiveList relatedBySmart with type="related" like="keywords" limit="5" %}
            {% for item in relatedBySmart %}
                {% if item.Id != currentArchiveId %}
                <li>
                    <a href="{{ item.Link }}">
                        {% if item.Thumb %}<img src="{{ item.Thumb }}" alt="{{ item.Title }}" loading="lazy">{% endif %}
                        <h4>{{ item.Title }}</h4>
                        <p>{{ item.Description|truncatechars:80 }}</p>
                    </a>
                </li>
                {% endif %}
            {% empty %}
                <li>暂无相关推荐。</li>
            {% endfor %}
        {% endarchiveList %}
    </ul>
</section>

Strategy three: The latest released or most viewed documents

Sometimes, we may want to recommend the freshest content on the website or the most popular hot content, which can also effectively guide users to browse.

`twig

Related articles

How to display the 'Previous' and 'Next' documents of the current document on the front page to enhance the user's browsing experience?

In AnQiCMS (AnQiCMS), adding "Previous" and "Next" navigation links to the front-end document pages is an important means to enhance user browsing experience and extend user stay time.When a user finishes reading an article, these links can guide them naturally to discover more related content, avoid interrupting page browsing, and effectively reduce the bounce rate, which also helps to enhance the overall weight of the website's content. AnQi CMS as a rich-featured Go language content management system, built-in with a powerful template tag system, allowing website operators to flexibly control content display. Among which

2025-11-09

How to accurately display the detailed content of a specific AnqiCMS document on the front page, including the title, description, and image?

AnQiCMS (AnQiCMS) leverages its flexible content model and intuitive template tag system, allowing you to easily manage the display of website front-end content.It is particularly important to understand the core mechanism and common tags when we need to present the detailed content of a specific document accurately on the front page, such as the title, description, full text, and related images.### Understanding the content structure of Anqi CMS In Anqi CMS, all content is organized based on the "content model", such as common article models, product models, etc.

2025-11-09

How to use AnqiCMS document list tags to display the latest, hot, or specified category of articles/products on the front page?

In AnqiCMS, flexibly displaying website content is the key to improving user experience and meeting operational needs.Whether you want to highlight the latest articles on the homepage, display popular products in the sidebar, or customize content lists for specific columns, AnqiCMS's powerful document list tags can help you a lot.By skillfully using these tags, you can easily achieve a diverse presentation of content, making your website more dynamic and attractive.### Core Tag: `archiveList`

2025-11-09

How to call and display the detailed content and images of a specific page in AnqiCMS on the front page?

In AnQiCMS, it is actually much simpler than you imagine to call and display the detailed content and images of a specific single page on the front page.AnQiCMS's powerful template tag system, especially the tags designed for single-page layouts, can help you achieve this easily. ### Understanding AnQiCMS Single Page Functionality Firstly, we know that AnQiCMS provides an independent "Page Management" module that allows us to create independent single pages such as "About Us", "Contact Information", or "Service Introduction".This page's content, images, SEO information, etc.

2025-11-09

How to display the custom parameter fields of AnqiCMS documents on the front page, such as authors, sources, and so on?

In website operation, the flexibility of the Content Management System (CMS) is crucial.AnQi CMS, with its powerful customizability, allows us to add various custom parameter fields to content (such as articles, products, etc.) to meet diverse display needs.These custom fields, such as the 'author', 'source', 'model', 'color' of products, etc., can greatly enrich the dimensions and practicality of content.How can we elegantly present these personalized custom parameters to visitors on the website frontend after we have added them in the background of the document

2025-11-09

How to implement the AnqiCMS document parameter filtering function on the front page to help users quickly locate content?

How to help users quickly find the information they are interested in on increasingly rich content websites is a crucial operational challenge.Users often need to filter content based on specific conditions rather than browsing aimlessly.AnqiCMS provides a powerful document parameter filtering function that allows you to easily achieve this goal on the front page, greatly enhancing user experience and content discoverability.

2025-11-09

How to display the AnqiCMS document Tag list on the front page and support filtering by letter or category?

In a content management system, a tag (Tag) is a powerful tool that helps us organize content more flexibly and improve the efficiency of users in finding relevant information.AnQiCMS as an efficient enterprise-level content management system naturally also deeply integrates powerful tag features.If you are hoping to display a list of document tags on the website front end and allow users to filter by letter or category, this article will provide you with a comprehensive guide.

2025-11-09

How to display detailed information of a specific AnqiCMS Tag on the front page, such as description and Logo?

AnqiCMS as an efficient content management system not only provides rich content publishing and management functions, but also provides great flexibility for the display of front-end pages.In website operation, properly using tags (Tag) can effectively enhance the organization of content, user experience, and search engine optimization (SEO).When a user browses to a specific tag, if the page can directly display the detailed information of the tag, such as its description and exclusive Logo, it will undoubtedly greatly enhance the professionalism and attractiveness of the page.Next, we will explore how to use the AnqiCMS front page

2025-11-09