How to use友情链接 tags to display partner websites at the bottom of the website or other areas?

Calendar 78

In website operation, the cooperative website's friendship link is not only an important part of search engine optimization, but also an effective way to expand brand influence and promote traffic mutual promotion.Display these important cooperative partnerships prominently on the website, such as at the bottom or sidebar, which can effectively enhance user trust and the authority of the website.AnQiCMS (AnQiCMS) provides a convenient friend link management function and flexible tag calling method, allowing you to easily achieve this goal.

Friendship link backend management overview

While usinglinkListBefore the label, we first need to enter the information of the cooperative website into the Anqi CMS backend.The Anqi CMS provides a management interface for 'friend links' in the function management module.You can add, edit, or delete links here, set the name, URL address, and enable or disable each linknofollowProperties (this is very critical for passing the search engine weight). The system will properly save this information so that you can call it at any time on the website front end.

UselinkListTag display of cooperative websites

The AnQi CMS template system is designed very intuitively, allowing you to easily retrieve and display website data using specific tags. To display friend links, you need to uselinkList.

Basic usage of tags

linkListThe way the tag is called is very concise. Usually, you would use it like this:

{% linkList friendLinks %}
    {# 循环体,用于显示每个友情链接 #}
{% endlinkList %}

Here, friendLinksIs a variable name you define, used to iterate over each friendship link data within the loop body. You can name it more descriptively according to your habits.

Supported parameters

linkListThe tag supports an optional parameter:

  • siteId: This is a parameter for multi-site management. If you have created multiple sites in the Anqicms background and want to call the friend links under a specific site, you can setsiteId="您的站点ID"To implement. In most cases, if you have only one site or want to call the link of the current site, you can omit this parameter, and the system will default to getting all friendship links.

Available fields for friend links

InlinkListWithin the loop of tags,friendLinkseach variable initem(That is, each friend link) contains the following commonly used fields, which you can directly call to build links:

  • item.Title: The display name of the友情链接 (friendship link).
  • item.Link: The target URL address of the friend link.
  • item.Remark: Note information of the friend link (if set in the background).
  • item.Nofollow: A boolean value (1indicating yes,0Indicates no), indicating whether the link should be added.rel="nofollow"Property.

Actual code example

Suppose you want to display a row of friendship links at the bottom of the website and ensure that you follow SEO**practices, you can add attributes to non-recommended links.nofollowYou can write the template code like this:

<div class="footer-links">
    <h3>合作伙伴</h3>
    {% linkList friendLinks %}
        {% if friendLinks %} {# 确保有友情链接才显示区域 #}
        <ul class="partner-list">
            {% for item in friendLinks %}
            <li>
                <a href="{{ item.Link }}" {% if item.Nofollow == 1 %} rel="nofollow"{% endif %} target="_blank">{{ item.Title }}</a>
            </li>
            {% endfor %}
        </ul>
        {% else %}
        <p>暂无合作网站信息。</p>
        {% endif %}
    {% endlinkList %}
</div>

This code will first check if there is a friendship link present, if there is, it will display all the links in an unordered list. Each link will be automatically added according to the properties set in the backgroundNofollowautomatically addedrel="nofollow"Open in a new window.

Where should the friendship link be placed?

The display location of the friendship link is usually determined by the website's design and operational strategy.

  • Website Footer (Footer)This is the most common placement because it does not interfere with the main content and can be easily found by users and search engines. It is suitable for displaying a large number of or more general cooperative links.
  • Sidebar (Sidebar)If your website has a fixed sidebar, you can set up a "friend link" module here to provide more direct access.
  • Independent page: For websites that need to provide detailed introductions for each partner or have a large number of friendship links, create an independent "friendship links" page (such as/links.htmlIt would be a good choice. You can provide access to this page in the main navigation or footer links.

Considerations for the operation strategy of friendship links.

An effective management of友情链接 is an important part of website content operation. Through 安企CMS, you can flexibly control the display of links and combine SEO strategies:

  1. Regular updatesKeep outdated links or newly added partners updated to maintain the vitality of the link resources.
  2. Quality first: Prioritize exchanging friendship links with high-quality and highly relevant websites, avoid link farms to prevent affecting your own website's reputation and SEO performance.
  3. Reasonable usenofollowFor ad links, links of uncertain quality, or links you do not want to pass weight to, be sure to set them in the backgroundnofollowMake sure your website's weight is not dispersed or diluted.

Of Security CMSlinkListTags with their simple yet powerful functions provide great convenience for managing your website's友情链接 links, allowing your website to maintain good external connections while also keeping an excellent SEO status.


Frequently Asked Questions (FAQ)

  1. The link of friendshipnofollowHow to use the attribute? nofollowThe attribute is used to tell the search engine not to follow this link and not to pass the link weight to the target website. When managing friend links in the Anqi CMS background management, you can set whether to enable each link separately.nofollow. Call in the templatelinkListwhen the tag is encountered, just judgeitem.NofollowThe value(1means enabled,0means disabled), then respond accordingly in<a>the tag withrel="nofollow"As is, as shown in the article example.
  2. Can the friend link be displayed by grouping or type?The current Anqi CMSlinkListThe tag will retrieve all the friendship links added to the background. If you want to divide the friendship links into different groups (such as "strategic cooperation", "industry partners", etc.),linkListThe label itself does not provide directtypeorgroupFilter parameters. A common method to implement grouping display is to add a link in the background, marking its group in the "remark" field of the link, and then in the front-end template, you can first get all the links, and then judge through them.item.RemarkThe grouping keywords can be manually categorized and displayed. Alternatively, you can consider custom extensions on the development level of AnQi CMS to add new fields to support grouping.
  3. Can the display order of the friendship link be controlled? linkListThe tag itself does not provideorder(Sorting) The parameter is used to control the display order. The default display order of friend links usually depends on the order in which they are added or updated in the background, or by the sorting function of the background management interface.If you need to control the display order of the front-end precisely, you can adjust the sorting through the back-end management interface (if the system supports it), or after obtainingfriendLinksAfter the data, use the sorting function of the template language (such as some template engines support sorting arrayssortorsortedOperation), but this requires your template engine to support more complex list processing.

Related articles

How to safely and effectively display user comment lists and message forms in a template?

In modern website operations, user-generated content (UGC) is an important component for enhancing website activity and user stickiness.User comments and online message functions not only promote community interaction and provide valuable feedback, but also help enhance the richness of content and the activity of search engines.AnQiCMS as a content management system focusing on efficiency, security, and customization, provides us with powerful and flexible support to display these features safely and effectively in templates.Ensure that the comment list and message form are presented beautifully while兼顾 safety and functionality

2025-11-09

How to customize a template to achieve personalized display of single-page content (such as "About Us")?

In website operation, personalized display is crucial for shaping brand image and enhancing user experience.Especially single pages like "About Us" and "Contact Information", which carry the core information of the enterprise, can better convey the brand story and enhance the user's trust through customized design.AnQiCMS (AnQiCMS) provides a flexible way to achieve this goal, even for users with little technical background.### Understanding the Single Page Content Mechanism of Anqi CMS In Anqi CMS, single page content (such as "About Us")

2025-11-09

How to retrieve and display detailed information of a specified category (such as title, description, Banner image)?

In website operation, we often need to create unique and attractive display pages for specific categories, or flexibly call some detailed information of certain categories at different locations.For example, you may wish to display a dedicated Banner image at the top of a product category page, or list the title and introduction of a specific service category in the sidebar.AnQiCMS as an efficient and customizable content management system provides a very intuitive way to meet these needs.To obtain and display detailed information about a specified category, such as the title, description, and Banner image

2025-11-09

How the generation and processing method of thumbnails (such as cropping, padding) affects the front-end image display?

Optimize website image display: In-depth analysis of Anqi CMS thumbnail processing method In content management, images are an indispensable element to attract users and convey information.Whether a website image is clear, beautiful, and loads quickly directly affects the user experience and the overall professionalism of the page.And the thumbnail as the first impression of the image display, its generation and processing method is particularly important.AnQiCMS (AnQiCMS) provides a flexible thumbnail generation and processing mechanism for image management, allowing us to finely control the display effect of front-end images according to the needs of different scenarios.### Thumbnail

2025-11-09

How to configure pagination tags to provide user-friendly content list navigation?

In Anqi CMS, as the content on our website becomes richer and richer, how to efficiently organize and present this information so that visitors can easily find what they need among the vast amount of content has become a key issue.Excellent content list navigation, especially the pagination feature, not only enhances user experience, but is also an indispensable part of search engine optimization (SEO).The AnQi CMS provides powerful and flexible pagination tags, allowing you to easily configure user-friendly content list navigation.### The Foundation of Content List: Configure Content Retrieval Tag In Anqi CMS, all content lists, whether articles

2025-11-09

How to use if and for tags in templates to implement conditional judgment and loop display of data?

When building a website with AnQiCMS, the template is the key to content display.By flexibly using template tags, we can present the content of the back-end management in various forms to the users.Among them, `if` and `for` tags serve as the core of template logic control, helping us to implement conditional judgments and the cyclic display of data, making the website content more dynamic and rich.AnQiCMS's template engine borrows the syntax style of Django, which makes learning and using these tags very intuitive.It allows us to write logic directly in the template

2025-11-09

How to ensure that the date and time are displayed correctly on the front end using the timestamp formatting tag?

In website content operation, the correct display of date and time information is crucial, as it not only affects the user's reading experience but also directly relates to the timeliness and accuracy of the information.AnQiCMS (AnQiCMS) understands this point and provides a powerful and flexible timestamp formatting tag, allowing developers and operators to easily convert the original timestamp stored on the backend into a date and time format that is intuitive and easy to read for front-end users.Why do we need timestamp formatting?\n\nWe know that the data stored on the website backend, especially publishing time, update time, comment time, etc.

2025-11-09

How to reference external HTML fragments (such as headers, footers) in AnQiCMS templates to display modular content?

In website operations, maintaining the modularization and high reusability of content can not only significantly improve development efficiency, but also make the website more flexible during iterative updates.AnQiCMS (AnQiCMS) provides a straightforward and efficient solution with its powerful template engine to achieve this goal.This article will delve into how to make clever use of the Anqi CMS template mechanism, referencing external HTML fragments such as headers and footers, thus building a website that is easy to manage and has a clear structure. ### The Value of Modular Content: Why Reference External HTML Fragments?Imagine

2025-11-09