On AnQiCMS content detail page, displaying related articles can effectively guide visitors to browse more content, reduce the bounce rate, and also enhance the website's SEO performance through internal link structure.AnQiCMS as a system designed specifically for content operation, provides flexible and powerful template tags, allowing us to easily implement 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 set of intuitive mechanisms.The system will first identify the closest other articles to the current article by 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 relevant by keyword or manual association.
Call related article list in template
In AnQiCMS template design, we mainly usearchiveListThis powerful document list tag is used to call related articles. To display related articles on the article detail page, you need to givearchiveLista labeltype="related"The parameter.
For example, in your article detail template file (usually{模型table}/detail.htmlIn the brackets, 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 adivto wrap the entire related article area, then use thearchiveListtag to retrieve the data.relatedArchivesis the variable name we define for this list.type="related"tells the system what we need is related articles.limit="5"limits it to only displaying 5 articles.forIn 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 intype="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 current article's keywords, you canarchiveListtag.like="keywords".AnQiCMS will search for other articles containing the same keyword as the first keyword set in the background of the current article.This requires us to fill in the keywords of the article carefully when publishing articles in the background.You can manually input keywords for each article on the 'Publish Documents' page under 'Content Management', 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.archiveListsetting 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 and find the 'Publish Document' or 'Edit Document' section, where you will usually find an 'Other Parameters' area. There will typically be an option for 'Related Documents', allowing you to manually select or search for other articles to associate with.
If not setlikeParameters, 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, butlikeThe parameter provides more flexible customization space.
Optimization and **Practice
- Limit the number: Through
limitReasonably control the number of related articles, usually 5-10 is enough, too many might distract the user's attention. - Visual DesignThe style of the list of related articles should be concise and clear, highlighting the title and thumbnail, avoiding overshadowing the main content.
- Content MaintenanceRegularly check whether the classification, tags, and keywords of the articles are set accurately, as this directly affects the quality of the relevant articles recommended by AnQiCMS.
- Manual adjustmentFor core content or important articles, consider using
like="relation"manually associate the most relevant articles to ensure the accuracy of recommendations. - pseudo-static linksAnQiCMS supports pseudo-static and 301 redirection management, ensuring that the links of relevant articles are SEO-friendly static addresses, which helps search engines to crawl and pass weight.
Configuring and displaying related article lists correctly in AnQiCMS is a continuous optimization process. By flexibly usingarchiveListTags and parameters, combined with backend fine-grained content management, enable your website to provide visitors with a more cohesive and valuable browsing experience, while also improving the overall SEO performance of the website.
Common Questions (FAQ)
Q1: If I have not set keywords or manually associated, how will AnQiCMS display related articles?
A1:If you have not set aarchiveLista tag specificationlikeParameters (e.g.,)like="keywords"orlike="relation"),AnQiCMS will enable its default intelligent matching logic.This usually means the system will search for other articles that are in the same category as the current article, have similar tags, or similar content, and recommend several "closest" articles based on internal algorithms.So, even without manual intervention, there are usually basic related recommendations.
Q2: How many articles should I display in the list of related articles? Do you have a recommended 'limit' value?
A2:The number of recommended related articles typically depends on your page layout and user experience goals.Generally speaking, displaying 5 to 10 articles is a relatively balanced choice.The number may be too low to effectively guide users, or too high to make the page appear cluttered, distracting users' attention.limitvalue.
Q3: Are the links in the list of related articles SEO-friendly? Do they pass weight? A3:Yes, the related article links generated by AnQiCMS are typically 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 effectively pass the page authority 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 rule configuration is correct to maximize the SEO value of internal links.