How to correctly display the list of related articles on the content detail page in AnQiCMS?

On AnQiCMS content detail page, displaying related article lists can effectively guide visitors to browse more content, reduce the bounce rate, and enhance the website's SEO performance through internal link structure.AnQiCMS is a system designed specifically for content operation, providing flexible and powerful template tags, allowing us to easily achieve this function.

How to identify and display related articles in AnQiCMS

To make the content detail page intelligently display a list related to the current article, AnQiCMS provides a straightforward mechanism.The system will first identify the closest related articles to the current article through default intelligent algorithms, such as based on the category, tags, or content similarity of the article.In addition, to provide more precise control, AnQiCMS also allows us to explicitly specify which articles are related through keywords or manual association.

Call related article list in template

In AnQiCMS template design, we mainly usearchiveListThis powerful document list label is used to call related articles. To display related articles on the article detail page, you need to givearchiveListlabel totype="related"the parameter.

For example, in your article detail template file (usually{模型table}/detail.html), you can introduce a related article list like this:

<div class="related-articles-section">
    <h2>相关推荐</h2>
    <ul>
        {% archiveList relatedArchives with type="related" limit="5" %}
            {% for item in relatedArchives %}
            <li>
                <a href="{{item.Link}}" title="{{item.Title}}">
                    {% if item.Thumb %}
                        <img src="{{item.Thumb}}" alt="{{item.Title}}">
                    {% endif %}
                    <h3>{{item.Title}}</h3>
                    <p>{{item.Description|truncatechars:80}}</p>
                    <span>发布于:{{stampToDate(item.CreatedTime, "2006-01-02")}}</span>
                    <span>浏览量:{{item.Views}}</span>
                </a>
            </li>
            {% empty %}
            <li>暂无相关推荐文章。</li>
            {% endfor %}
        {% endarchiveList %}
    </ul>
</div>

This code will first use adivEnclose the entire relevant article area and then usearchiveListLabel to retrieve data.relatedArchivesIs the variable name we define for this list,type="related"Tell the system what we need is relevant articles,limit="5"Then it limits only showing 5 articles. InforIn the loop, we can retrieve the title, link, thumbnail, introduction, publish time, and view count of each article for display. If there are no related articles,{% empty %}Part of the content will be displayed.

Deep understandinglikeParameters, customize relevance

AnQiCMS istype="related"Based on that, it also provideslikeParameters, allowing you to control the matching logic of related articles more finely:

  • like="keywords": Based on keyword matchingIf you want related articles to be recommended based on the keywords of the current article, you canarchiveListthe tag withlike="keywords". AnQiCMS will search for other articles containing the same keyword set as the first one in the background of the current article.This requires us to fill in the article keywords carefully when publishing articles in the background.You can manually enter keywords for each article under the "Content Management" "Publish Document" interface, or select them from the keyword library, separating multiple keywords with English commas.

  • like="relation": Manually associateFor scenarios that require precise control of relevance, AnQiCMS supports manual association of articles. InarchiveListSet in the labellike="relation"The system will only display the 'related documents' you explicitly set in the background article editing interface.This means you can go to the 'Content Management' page, find the 'Publish Document' or 'Edit Document' page, locate the 'Other Parameters' area, where there is usually an option for 'Related Documents', allowing you to manually select or search for other articles to associate with.

If not setlikeThe parameter, AnQiCMS will use the default intelligent matching logic, which is usually to find articles in the same category or with similar tags as the current article. This usually meets most needs, butlikeParameters provide more flexible customization space.

optimize and **practice

  1. Limit the number: PasslimitParameters should reasonably control the number of related articles, usually 5-10 is enough, too many may distract the user's attention.
  2. Visual designThe style of the related article list should be concise and clear, highlighting the title and thumbnail, avoiding the main guest being overshadowed.
  3. Content maintenanceRegularly check the accuracy of the classification, tags, and keyword settings of the articles, as this directly affects the quality of the relevant articles recommended by AnQiCMS automatically.
  4. Manual adjustmentFor core content or important articles, consider usinglike="relation"Manually associate the most relevant articles to ensure the accuracy of recommendations.
  5. Static links: AnQiCMS supports pseudo-static and 301 redirect management to ensure that the links of related articles are SEO-friendly static addresses, which is helpful for search engine crawling and weight transmission.

Configuring and displaying the relevant article list correctly in AnQiCMS is a continuous optimization process. By using flexiblyarchiveListTags and parameters, combined with fine-grained management of content on the back end, your website can provide visitors with a more coherent and valuable browsing experience, while also improving the overall SEO performance of the website.


Frequently Asked Questions (FAQ)

Q1: How will AnQiCMS display related articles if I have not set keywords or manually associated? A1:If you have not set uparchiveListSpecify the taglikeParameters (for examplelike="keywords"orlike="relation"),AnQiCMS will enable its default intelligent matching logic.This usually means that the system will look for other articles that are in the same category as the current article, have similar tags or content, and recommend a few "closest" articles according to the internal algorithm.So, even without manual intervention, there will usually be basic related recommendations.

Q2: How many articles should I display in the related article list? Is there a recommended 'limit' value? A2:The number of recommended related articles usually depends on your page layout and user experience goals.In general, displaying 5 to 10 articles is a balanced choice.The amount may be too little to effectively guide users, and too much may make the page look cluttered, distracting the user's attention.Suggest adjusting according to your website design and user testing feedback to find the most suitable one for your websitelimitValue.

Q3: Are the links in the related article list SEO-friendly? Do they pass weight? A3:Yes, the related article links generated by AnQiCMS are usually SEO-friendly.AnQiCMS supports pseudo-static URLs, which means these links are usually clean and readable static addresses.As internal links on a website, they can effectively pass the weight of the current page to the relevant target articles, which is very beneficial for improving the ranking of the target articles and optimizing the overall internal link structure of the website.Ensure your pseudo-static rules are correctly configured to maximize the SEO value of internal links.