How does AnQi CMS display related article lists based on keywords or relevance?

Calendar 👁️ 72

In content management and website operation, how to effectively improve user experience, extend the visitor's stay on the site, and optimize the search engine crawling efficiency is a key concern for every operator.Among them, displaying highly relevant recommended content with the current article is undoubtedly an effective method.AnQiCMS as an efficient content management system fully considers this requirement and provides flexible and powerful functions to easily achieve this goal.

Core function analysis:archiveListThe clever use of tags

AnQiCMS provides powerful template tags that allow you to build complex page structures and data displays without delving into programming. When implementing the feature of related article lists,archiveListTags are your core weapon. It can not only list the regular article list, but also intelligently filter and display the content highly related to the current article through its unique parameter configuration.

The key to implementing the list of related articles isarchiveListin the labeltype="related"The parameter. When you use this parameter on the article detail page, AnQiCMS will automatically identify the current article and recommend other articles based on the association logic you set.

Understand the association logic: keywords and manual settings

AnQiCMS provides two main association logic methods to determine which articles are 'related':

Method one: Smart association based on keywords

AnQiCMS can intelligently find other articles with similar themes based on the keywords and Tag tags set in the article.This method utilizes the intrinsic connection of the content, the recommended results are usually more in line with the reader's interests.

To enable smart association based on keywords, you need toarchiveListUsed in tagslike="keywords"Parameters. The system will match and recommend similar articles based on the keywords and Tag information of the current article.

To make this intelligent association more accurate, it is recommended that you make full use of the 'Document Keywords' and 'Tag Tags' functions in the background when publishing content.Add precise and rich keywords and tags to each article, as this not only helps with the recommendation of related articles, but also is an important means to improve SEO effectiveness.

Code example: Recommend relevant articles based on keywords

{# 假设这是文章详情页的模板,此代码块将显示基于关键词推荐的5篇文章 #}
<div class="related-articles">
    <h2>相关推荐</h2>
    <ul>
    {% archiveList relatedArticles with type="related" like="keywords" limit="5" %}
        {% for item in relatedArticles %}
        <li>
            <a href="{{item.Link}}" title="{{item.Title}}">
                {% if item.Thumb %}<img src="{{item.Thumb}}" alt="{{item.Title}}" class="article-thumb">{% endif %}
                <h3>{{item.Title}}</h3>
                <p class="description">{{item.Description|truncatechars:80}}</p>
                <div class="meta">
                    <span>{{stampToDate(item.CreatedTime, "2006-01-02")}}</span>
                    <span>{{item.Views}} 阅读</span>
                </div>
            </a>
        </li>
        {% empty %}
        <li>暂无相关推荐。</li>
        {% endfor %}
    {% endarchiveList %}
    </ul>
</div>

Method two: Edit carefully planned manual associations

Under certain specific scenarios, you may want to more accurately control which articles should be associated with each other, for example, if you are promoting a product series or need to guide users to read a specific content path.AnQiCMS also provides this flexibility, allowing you to manually select related articles in the background article editing interface.

When you want the system to only display the articles you manually selected or associated in the article detail page on the backend, you can usearchiveListlabel'slike="relation"Parameters. This method ensures the absolute accuracy of the recommended content, fully in line with your operational intent.

Code example: recommend related articles based on manual association.

{# 假设这是文章详情页的模板,此代码块将显示手动关联的3篇文章 #}
<div class="manual-related-articles">
    <h2>精选推荐</h2>
    <ul>
    {% archiveList handpickedArticles with type="related" like="relation" limit="3" %}
        {% for item in handpickedArticles %}
        <li>
            <a href="{{item.Link}}" title="{{item.Title}}">
                {% if item.Logo %}<img src="{{item.Logo}}" alt="{{item.Title}}" class="article-logo">{% endif %}
                <h4>{{item.Title}}</h4>
                <p class="meta">分类:{% categoryDetail with name="Title" id=item.CategoryId %}</p>
            </a>
        </li>
        {% empty %}
        <li>暂无精选推荐。</li>
        {% endfor %}
    {% endarchiveList %}
    </ul>
</div>

Flexible application: Customize related article list

In addition to the two core association methods mentioned above,archiveListTags also provide various parameters to help you finely control the display of related article lists:

  • limit: Control the display quantity. You can setlimit="5"to display 5 articles, orlimit="3,7"to start displaying 7 articles from the 3rd one.
  • moduleId: Limit recommended content from a specific content model. For example,moduleId="1"Only show related content under the "Article" model.
  • categoryId: Limit recommended content to a specific category. For example,categoryId="10"Only display articles related to the current article and belong to the category with ID 10.
  • excludeCategoryId: Exclude certain categories of articles. If you do not want certain categories of articles to appear in related lists, you can use this parameter.
  • flagBased on the recommended attributes of the article (such as headline, recommended, slideshow, etc.) for filtering. For example,flag="c"Only show articles marked as 'recommended'.
  • order: Adjust the sorting method of related articles. Althoughtype="related"It has its internal sorting logic by default, but you can also try to useorder="views desc"Sort by view count in reverse order, ororder="id desc"Sort by the most recent release.

By combining these parameters, you can create highly customized, more attractive related article lists according to the actual needs and content operation strategy of the website.

Summary

AnQiCMS through its powerfularchiveListLabel and flexible parameter configuration, providing you with multiple ways to display related article lists.Whether it is based on the intelligent keyword matching of the system or through manual settings for precise recommendation, it can effectively enhance the content depth and user engagement of the website.Make good use of these features, and it will make your website content more vibrant and easier to gain the favor of search engines.


Frequently Asked Questions (FAQ)

Q1: Why is the related article list not displayed on my article detail page?

A1: Please check the following points:

  1. Is the template code correct?Make sure you have already setarchiveListwith the tag andtype="related"Parameters added to the article detail page template and there are no syntax errors.
  2. Article Keywords/Tag:If you are usinglike="keywords"Please confirm whether the article itself has set keywords or Tags, and whether there are other articles associated with these keywords/Tags.
  3. Manual association setup:If you are usinglike="relation"Please check if you manually associated other articles while editing the current article in the background.
  4. Number of contents:Make sure your website has enough content so that the system can find enough relevant articles to recommend.

Q2:like="keywords"How is the similarity of articles judged?

A2: When you uselike="keywords"When a parameter is set, AnQiCMS will first obtain the "document keywords" and "Tag tags" set in the current article. Then, it will search for other articles containing these keywords or tags in the entire content library, and sort them according to factors such as match degree, publishing time, and so on, finally

Related articles

How to obtain and display the 'previous article' and 'next article' of the current article in AnQi CMS?

In AnQi CMS, implementing the "Previous" and "Next" navigation function on the article detail page can not only significantly improve the user's browsing experience, but also effectively enhance the internal link structure of the website, and has a positive promoting effect on search engine optimization (SEO).The AnQi CMS provides a simple and powerful template tag, making this feature easy to use.

2025-11-08

How does the customized content model of AnQi CMS affect the display of front-end article content?

In AnQiCMS (AnQiCMS), the custom content model plays a core role, which directly determines the structure and display of the front-end article content.For content operators, understanding and making good use of this feature is the key to achieving personalized website content, improving user experience, and enhancing operational efficiency.**I. Understanding Custom Content Models: The Foundation of Flexible Content Management** Traditional CMS systems may only provide fixed content types such as "articles" and "pages", but in actual operation, websites often need to display more diverse content, such as product details, event information

2025-11-08

How to implement pagination display of article lists in Anqi CMS?

In a content management system, pagination display of the article list is a basic and important function.It not only effectively manages a large amount of content, improves the loading speed of the website, and avoids users feeling tired from facing an endless scrolling page, but is also a key link in Search Engine Optimization (SEO), helping search engines to better crawl and index website content.For users of AnQiCMS, implementing pagination for the article list is intuitive and powerful, thanks to its flexible and Django-like template engine.The AnQi CMS template system provides us with two core tags

2025-11-08

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

In website operation, URL structure is one of the key factors affecting search engine visibility and user experience.A clear, logical, and search engine-friendly URL that allows the crawler to better understand the website content, thereby improving the website's ranking in search results.AnQiCMS (AnQiCMS) took this into consideration from the very beginning, providing multiple features to help optimize the URL structure of websites for better search engine display effects. ### Core Function Analysis: How AnQi CMS Creates Friendly URL Structures **1.

2025-11-08

Does AnQi CMS support automatic conversion of images to WebP format to optimize display speed?

During the process of building and operating a website, the speed of image loading is always one of the key factors affecting user experience and search engine optimization.The size of an image directly affects the loading efficiency of a page.Many website operators are looking for more efficient image formats to improve website performance.So, for the Anqi CMS we are using, does it support automatic conversion of images to WebP format to optimize the display speed of the website?The answer is affirmative. Anqi CMS fully considers the needs of website performance optimization, and built-in support for WebP image format.This practical feature

2025-11-08

How to display the contact information and social media links on AnQi CMS templates?

In website operation, clearly and effectively displaying contact information and social media links is crucial for building customer trust and promoting interaction.AnQiCMS (AnQiCMS) provides a convenient and flexible way to easily integrate key information into website templates. --- ### One: Prepare: Configure contact information and social media in the Anqi CMS backend Before displaying contact information and social media on the website front end, we need to configure it in the Anqi CMS backend.This is like preparing a complete business card for our website.1

2025-11-08

How to implement the 'Recommended Attributes' tag highlighting in the front-end of AnQi CMS?

AnQi CMS provides a powerful content management function, among which the "recommended attribute" tag is a very practical tool in content operation.It can help us effectively organize and highlight the important content on the website, whether it is to improve the user experience or to better optimize SEO, these properties can play a key role.Understanding "Recommended Attributes": A Tool for Content Operations In Anqi CMS, "Recommended Attributes" are special identifiers set for each document (such as articles, products, etc.).

2025-11-08

How to set independent display templates for different article categories in AnQi CMS?

Our Aanqi CMS offers high flexibility in content display, one very practical feature is that it can set independent display templates for different article categories.This means you can customize unique visual styles and layouts for different categories of content, thereby highlighting the content, improving user experience, and even meeting specific SEO requirements. To achieve this goal, we need to start from several aspects such as preparing the template file, setting up the background, and designing the template content.Understanding the concept of categories and article templates in AnQi CMS

2025-11-08