How to make visitors easily find more related content after reading an excellent article on your website, continue to explore your site, which can not only significantly improve the user experience, but is also a key strategy to optimize website SEO and reduce the bounce rate.AnQiCMS provides powerful and flexible features, allowing you to easily configure and display related article lists on the article detail page and specify relevance rules according to actual needs.

Next, we will together understand how to achieve this goal in Anqi CMS.

Understand the value of the related article list.

Imagine that when a user is interested in a topic and has finished reading a deep article, if they can immediately see several related articles that are equally engaging, they are likely to continue reading instead of closing the page.This seamless reading experience can not only extend the user's stay on your website and increase page views, but also pass the relevance between pages to search engines through the construction of internal links, thus improving the overall weight and keyword ranking of the website.A security CMS precisely captures this core value, providing you with an intuitive and efficient solution.

Display the related article list on the article detail page.

To display related articles on the article detail page, we first need to edit the corresponding content template. According to the template design conventions of Anqi CMS, the article detail page usually corresponds to thetemplate/{您的模板目录}/{模型table}/detail.htmlFile. In this template file, you can use built-inarchiveListtags to retrieve and display related articles.

For example, the most basic code for a related article list might look like this:

<section class="related-articles">
    <h3>相关文章推荐</h3>
    <ul>
        {% archiveList relatedArticles with type="related" limit="5" %}
            {% for item in relatedArticles %}
                <li><a href="{{item.Link}}">{{item.Title}}</a></li>
            {% empty %}
                <li>暂时没有找到更多相关文章。</li>
            {% endfor %}
        {% endarchiveList %}
    </ul>
</section>

This code will default to retrieve 5 related articles to the current article.type="related"It is the key parameter we need to retrieve the list of related articles. If the articles on your current page do not have matching content,{% empty %}The text in the label will be displayed, avoiding blank pages.

Specify relevance rules: automatic matching and precise control

Of Security CMSarchiveListTags not only support default relevance matching but also provide more detailed rules, allowing you to flexibly configure according to actual operational strategies.

1. Smart matching based on keywords

When you want the system to automatically recommend related articles based on keywords in the article content, you can uselike="keywords"Parameters. This method is very suitable for websites with a large amount of content and a wide range of keywords, which can achieve highly automated recommendations for related articles.

To enable keyword matching, you need to make sure that the "Document Keywords" field is filled in correctly when the article is published in the background. In the Anqi CMS backend, when editing or publishing an article, find the "Document Keywords" input box and enter keywords highly relevant to the article content. Separate multiple keywords with English commas.,Splitting. The system will intelligently search for other related articles based on these keywords.

In the template, you can adjust it like this.archiveListTags:

<section class="related-articles">
    <h3>根据关键词为您推荐</h3>
    <ul>
        {% archiveList relatedArticles with type="related" like="keywords" limit="5" %}
            {% for item in relatedArticles %}
                <li><a href="{{item.Link}}">{{item.Title}}</a></li>
            {% empty %}
                <li>暂时没有找到更多相关文章。</li>
            {% endfor %}
        {% endarchiveList %}
    </ul>
</section>

This system will intelligently match and display related articles based on the keywords of the current article.

2. Manually set precise association

In certain specific scenarios, you may need to make very precise recommendations for certain articles, such as to guide users to read specific articles in a series, or to promote a core product.At this time, Anqi CMS provides the function to manually set related articles. Bylike="relation"Parameter, you can make the list display only the articles explicitly specified in the article editing interface.

In AnQi CMS backend, when you edit an article, you can find the configuration item for 'related documents' in the 'other parameters' or 'more model custom fields' section (the specific name may vary depending on your content model customization).Here, you can manually select or enter other articles you want to associate with the current article.

In the template, you can use it like thisarchiveListTags:

<section class="related-articles">
    <h3>编辑精选相关推荐</h3>
    <ul>
        {% archiveList relatedArticles with type="related" like="relation" limit="3" %}
            {% for item in relatedArticles %}
                <li><a href="{{item.Link}}">{{item.Title}}</a></li>
            {% empty %}
                <li>没有手动设置的精选相关文章。</li>
            {% endfor %}
        {% endarchiveList %}
    </ul>
</section>

In this way, you can completely control which articles will be recommended on the current page, achieving the most accurate content marketing and user guidance.

Advanced Optimization and Precautions

  • Quantity control: limitThe parameter is very practical, you can flexibly adjust the number of related articles displayed according to the page layout and importance. For example, you can display more at the bottom of the article and less in the sidebar.
  • Layout and Style:The list of related articles is usually placed at the bottom of the article content or as a module in the sidebar. In<section>or<div>Add an appropriate CSS class to the tag and beautify it through the stylesheet to keep it consistent with the overall design style of your website and enhance its visual appeal.
  • Combine usage:You can even use multiple relevance rules on the same article detail page to display different lists of related articles, such as one list showing articles automatically matched by keywords, and another list showing articles manually selected by editors.
  • SEO benefits:A good article recommendation system, helps to build a strong internal link network, guide search engine spiders to crawl the website content more deeply, and enhance the SEO value of all related pages.

By using these flexible configurations provided by Anqi CMS, you can easily create an intelligent and efficient related article recommendation system that not only optimizes the user reading experience but also brings tangible operational benefits to your website.


Frequently Asked Questions (FAQ)

Q1: If the article does not have any keywords set,like="keywords"will the list of related articles still be displayed?A1: If the article has not set any keywords,like="keywords"The rule may not be able to effectively match related articles because the system lacks a matching basis. In this case, the list is likely to display{% empty %}The content in the label. To ensure the effectiveness of recommendations, it is recommended to fill in relevant keywords when publishing articles.

Q2: Where can the configuration of the 'related documents' for manually setting related articles be operated?A2: In the Anqi CMS backend, when editing specific articles, you can find the configuration item named "related documents" or a similar custom field in the "other parameters" section of the article editing page.Here, you can select or search for other articles and manually associate them.

Q3:archiveListWhat is the default sorting rule for 'related articles' of tags?A3: When you do not specifylikeparameters,type="related"The system will default to intelligently retrieving nearby documents that are in the same category or have similar content based on the current article's ID.The specific sorting logic usually prioritizes the latest released or highly viewed articles within the same category to ensure the timeliness and popularity of recommendations.