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

Calendar 👁️ 77

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.

Related articles

How to implement the dynamic display of multi-level navigation menus in front-end templates?

In web design, a clear and easy-to-use navigation menu is the key to improving user experience and the professionalism of the website.AnQiCMS (AnQiCMS) provides the convenience of dynamically building multi-level navigation menus in front-end templates with its flexible template engine and powerful content management features.Understand the backend configuration and the calling logic of the front-end template of its navigation system, which is the foundation for achieving this goal. ### Overview of Anqi CMS Navigation System The navigation feature of Anqi CMS is designed to be very practical, closely integrating the creation of navigation menus with content display. On the backend

2025-11-07

How to implement lazy loading (Lazyload) of images in the article content to optimize page performance?

In website operation, page loading speed is crucial for user experience and search engine optimization (SEO).Especially when the article content includes a large number of images, the loading of image files often becomes the "culprit" that slows down the page speed.Lucky enough, by implementing the Lazyload image technology, we can effectively solve this problem.For friends using AnQiCMS, understanding and applying this technology will significantly improve website performance. Image lazy loading, as the name implies, is to delay the loading of images outside the user's current viewport.When the user scrolls the page

2025-11-07

How does AnQiCMS ensure the safety and compliance of front-end displayed content, such as sensitive word filtering?

When operating a website, the security and compliance of content is an indispensable part, especially in the context of the increasingly regulated online environment today.For users who use AnQiCMS, the system provides a variety of functions to help ensure the security and compliance of the displayed content on the front end, such as the sensitive word filtering that users are generally concerned about.At the beginning of its design, AnQiCMS placed content security at the core position.It is not just a content publishing tool, but also a platform dedicated to providing users with a safe and compliant content management environment

2025-11-07

How to call and display the contact information (phone, email, address) set in the back-end template on the front-end?

It is crucial to clearly and effectively display contact information in website operation to establish user trust and promote communication.Whether it is to consult products, seek service support, or give feedback, a reachable phone, email, or address can greatly enhance the user experience.AnQiCMS (AnQiCMS) fully considers this requirement, providing a flexible and convenient way for website administrators to centrally manage contact information in the background, and easily call and display on the front-end page through simple template tags.### Step 1

2025-11-07

How to display custom product parameters and specifications on the product detail page?

Add custom parameters and specifications to the product detail page in AnQiCMS, which can make your product information more detailed and professional.Whether it is the technical parameters of electronic products or the size and color options of clothing, you can easily achieve these personalized display requirements through a flexible content model.Next, we will step by step understand how to set, fill in, and finally display these customized parameters and specifications on your product detail page.--- ### Step 1: Define product custom parameters in the background Start adding custom parameters to the product

2025-11-07

How to set the display logic and hierarchy of breadcrumb navigation in AnQiCMS template?

When building a website, breadcrumb navigation not only effectively improves user experience and helps visitors understand their current location, but is also an indispensable part of search engine optimization (SEO), as it clearly shows the hierarchical structure of the website.For websites using AnQiCMS to manage content, flexibly setting the display logic and hierarchy of breadcrumb navigation is an important task in template creation.AnQiCMS provides a powerful and easy-to-use template tag for handling breadcrumb navigation, allowing you to easily implement it in the front-end template without writing complex backend logic

2025-11-07

How is the 'Multi-site Management' feature of AnQiCMS implemented to display different site content independently?

## Deeply analyze the "Multi-site Management" feature of AnQiCMS: How to ensure independent display of content?How to efficiently manage content when operating multiple websites or owning multiple brand sub-sites, while ensuring the independence of content on each site, is a challenge faced by many operators.The "multi-site management" feature provided by AnQiCMS is designed to solve this pain point.It not only allows you to manage all sites in a single background, but also fundamentally ensures that the content of each site is displayed independently, avoiding confusion and errors.So, AnQiCMS

2025-11-07

How to only display documents of the current category on the category list page and not include documents of subcategories?

When operating a website, we often encounter the need to display content, one common scenario being how to precisely control the displayed content on a category list page.Sometimes, we hope to display documents under a main category page, including all subcategory documents as well, to provide more comprehensive information.However, in some cases, in order to maintain the purity of the page theme and the focus of the content, we may only want to strictly display the documents under the current category without including any content from subcategories.AnQi CMS as a flexible content management system

2025-11-07