How to display related documents or search results on the article list page?

Calendar 👁️ 65

How to make visitors find the content they are interested in faster, or seamlessly discover more related information after reading an article, is the key to improving user experience and website stickiness.AnQiCMS provides powerful and flexible template tags that can help us easily implement displaying related documents or search results on the article list page, thus building a more intelligent and interactive website.

Skillfully use content list tags to present dynamic information

One of the core advantages of Anqi CMS lies in its highly customizable template system. For article (or product) list pages, we mainly use a powerful template tag:archiveList. This tag is the foundation for building content lists, and by pairing with different parameters, it can achieve various content display methods, including regular lists, pagination lists, related document lists, and even search results.

UnderstandingarchiveListlabel'stypeParameters are crucial. They determine the type of the list:

  • type="list": Used to display a fixed number of content lists, usually used in sidebar recommendations, the latest articles on the homepage, and other scenarios.
  • type="page"Used to build a content list with pagination functionality, suitable for article archive pages, category pages, or search result pages.
  • type="related"Specifically used to display content related to the current article.

Next, we will discuss how to cleverly present related documents and search results on the article list page.

Display 'related documents' on the article list page.

When a user is reading a specific article, we usually want to recommend some articles with similar themes and complementary content, which is the role of 'related documents'.AnQi CMS can intelligently find related content based on multiple logic.

To implement this feature, you need to first make sure that your template file is the article detail page template (usually 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先确保你的模板文件是文章详情页的模板(通常是 实现这一功能,你需要先archive/detail.htmlOr a custom document template). On this page, you first need to get some information about the current document, such as its ID or keywords, so that the security CMS can know what it is related to.This can be donearchiveDetailLabel it easily.

{# 假设这是文章详情页的模板,我们首先获取当前文档的ID和关键词 #}
{% archiveDetail currentArchive with name="Id" %} {# 获取当前文档ID #}
{% archiveDetail currentKeywords with name="Keywords" %} {# 获取当前文档的关键词 #}

<div class="related-articles-section">
    <h3>相关推荐</h3>
    <ul class="related-list">
    {# 使用 archiveList 标签,并设置 type="related" 来获取相关文档 #}
    {# limit="5" 表示显示5篇相关文档 #}
    {# like="keywords" 会根据当前文档的关键词来查找相关文档。
       如果希望根据后台手动设置的相关文档,可以使用 like="relation" #}
    {% archiveList relatedArchives with type="related" limit="5" like="keywords" %}
        {% for item in relatedArchives %}
        <li>
            <a href="{{ item.Link }}" title="{{ item.Title }}">
                {% if item.Thumb %}
                <img src="{{ item.Thumb }}" alt="{{ item.Title }}" class="related-thumbnail" />
                {% endif %}
                <span class="related-title">{{ item.Title }}</span>
            </a>
        </li>
        {% empty %}
        <li>暂无相关内容推荐。</li>
        {% endfor %}
    {% endarchiveList %}
    </ul>
</div>

In this code block,archiveListlabel'stype="related"Parameters are the key to implementing related documentation. Anqi CMS will default to intelligently recommending content based on the current document's category, model, or backend settings. Throughlike="keywords"It will give priority to matching other articles with similar keywords to the current article; whilelike="relation"it will show the "related documents" manually added when editing articles in the background.limitThe parameter controls the number of items displayed.

Build the presentation of the "search results" in the article list.

Providing in-site search functionality is an important way to enhance users' ability to navigate autonomously.After the user enters a keyword, we hope to present the relevant results in a clear list.This usually appears on a dedicated search results page (for example/searchImplemented on, but can also be integrated into a general article list template.

First, you need a search form that allows users to enter keywords:

<form action="/search" method="get" class="website-search-form">
    <input type="text" name="q" placeholder="输入你想搜索的内容..." value="{{ urlParams.q }}" class="search-input" />
    <button type="submit" class="search-button">搜索</button>
</form>

This form will be submitted to/searchthe path, and include a namedqparameter, whose value is the keyword entered by the user.{{ urlParams.q }}Will retain the user's last search keywords to enhance user experience.

Next, on your search results page template (usually)search/index.htmlOr any page you specify as a search result, you can usearchiveListtags to dynamically load search results:

`twig

{# 显示用户当前的搜索关键词 #}
<h3>搜索结果:<span>“{{ urlParams.q }}”</span></h3>

<ul class="search-results-list">
{# 使用 archiveList 标签,设置 type="page" 实现分页,limit="10" 每页显示10条 #}
{# q 参数会被安企CMS自动从URL中读取,无需手动传递 #}
{% archiveList searchResults with type="page" limit="10" %}
    {% for item in searchResults %}
    <li>
        <a href="{{ item.Link }}" title="{{ item

Related articles

How to implement pagination for article lists and limit the number of items per page?

In website operation, especially when managing a large amount of content, the pagination display of the article list is an indispensable function.It not only makes it easier for users to browse content, avoids the problem of too much data loading on a single page leading to slow speed, but also improves the overall user experience and SEO friendliness of the website.In AnQi CMS, it is very intuitive to implement pagination for the article list and flexibly control the number of items per page. Next, we will explore how to implement pagination for the article list in the Anqi CMS template and limit the number of articles displayed per page.--- ### Efficient Content Management

2025-11-08

How to filter tags through document parameters to achieve a combination display of list content with multiple conditions?

In content operation, we often need to display lists of content with different themes and properties, and allow visitors to filter according to their own needs. For example, a real estate website may need to filter listings by "house type", "location", "area range", and other multi-dimensional combinations.If each time is organized manually or developed custom, it is not only inefficient but also difficult to maintain.AnQiCMS (AnQiCMS) provides a flexible and powerful document parameter filtering mechanism that can help us easily achieve this combination display of list content with multiple conditions. Next

2025-11-08

How to display associated categories and tags lists on the article detail page?

When managing website content in AnQi CMS, the article detail page is the core page for users to obtain information.In addition to the content of the article itself, displaying the category information and related tag list of the article to the visitor can greatly improve the user experience, help visitors quickly understand the context of the article, and effectively enhance the internal link structure of the website, which is greatly beneficial for search engine optimization (SEO).Next, we will discuss how to flexibly display these related information on the article detail page of Anqi CMS.AnQi CMS uses an intuitive and powerful template tag system

2025-11-08

How to format the timestamp of an article into a readable date and time format for display?

In website content operation, the time of article publication or update is an important element in conveying information to visitors.A clear and readable date and time format not only improves user experience but also allows visitors to quickly understand the timeliness of the content.AnQi CMS provides a very practical template tag to help us easily achieve this goal.### Core Tool: `stampToDate` Tag Anqi CMS allows us to use the `stampToDate` tag

2025-11-08

How to get and display the custom parameters of a specified document (such as author, source)?

When using AnQi CMS to manage your website content, you may find that relying solely on default fields such as title, content, and summary is not enough to fully meet the needs of personalized display.For example, you may wish to display 'author' and 'source' information on the article detail page, or show 'material' and 'size' and other specific parameters on the product page.The AnQi CMS provides powerful custom parameter features, allowing you to easily add, manage, and display these personalized information for different types of documents (such as articles, products).This article will provide a detailed introduction on how to obtain and display custom parameters of specified documents in AnQi CMS

2025-11-08

How to get and display the list of all documents associated with a specified Tag?

Manage content in AnQi CMS, besides organizing through categories, flexibly using the "Tag" feature is also the key to improving the aggregation ability of website content and user experience.Tags can connect documents of different categories, different models, but with the same theme, providing visitors with more ways to discover content.How can we specifically retrieve and display the list of all documents associated with the specified tags?Next, we will delve deeper into this practical skill. ### Understanding the Tag System of AnQi CMS The tag design of AnQi CMS is very flexible, it does not depend on any specific category or model

2025-11-08

How to retrieve and display the list of friend links of a website?

In website operation, friendship links play an important role in connecting each other, promoting traffic, and improving search engine rankings.A well-maintained, clear display of the friendship link area, which not only reflects the openness of the website, but also provides users with more valuable jump paths.AnQiCMS provides users with a convenient friend link management feature, allowing you to easily obtain and display these links on your website. ### Manage your friend links: Backend settings Before starting the front-end display, we need to make sure that the friend links have already been configured in the Anqi CMS backend. Usually

2025-11-08

How to add and display a captcha in the comment or message form to prevent spam?

When operating a website, spam comments and malicious messages are always a headache, as they not only affect user experience but may also damage the professional image of the website.Fortunately, AnQi CMS provides a simple and effective way to solve this problem - that is to add a captcha to the comment or message form.This can greatly enhance the security of the website, filtering out most automated spam information.Below, let's take a detailed look at how to add a captcha to your comment and message form in Anqi CMS.This process can be divided into two steps, which is very intuitive and easy to operate.### Step 1

2025-11-08