How to set up the friendship link feature of AnQiCMS and correctly call it to display in the website template?

Calendar 👁️ 48

As an experienced website operator who deeply understands the operation of AnQiCMS, I know the value of friendship links to a website.They are not just simple external links, but also an important way to improve website authority, attract high-quality traffic, and enhance user trust.By carefully managing and arranging the links, we can effectively optimize the search engine performance of the website and provide visitors with more valuable extension information.

This article will detail how to set up友情链接 in AnQiCMS and display it correctly in your website template.

Set up友情链接 in the AnQiCMS backend.

Managing friend links in AnQiCMS is an intuitive and efficient process.First, you need to log in to your AnQiCMS admin interface.Once logged into the backend, you will see the function menu on the left, which includes the entry points for various functions of the website.

Please find and click on the item 'Function Management'. In the sub-menu of 'Function Management', you will find an option named 'Friend Link'.Click it to enter the management page of the friendship link.

On this page, you can perform all operations related to the link exchange. When you need to add a new link exchange, the system will provide the corresponding form for you to fill in the various information of the link, usually including:

  • Link NameThis is the name displayed for the friendship link on your website, which is usually the name or brand word of the other website.
  • Link AddressThis is the complete URL of the other website, make sure it is correct so that users can access it smoothly.
  • Link note: You can add some internal notes to the link for easy management and identification, and these notes are usually not displayed on the front end.
  • Is NofollowThis is an important SEO option. If this option is checked, the system will add it to the HTML code of the link exchange.rel="nofollow"This tells the search engine that the link should not pass the weight of your website, usually used to avoid passing weight to external websites that are not fully trusted, or to comply with search engine guidelines.

In addition to adding links, you can also edit the information of existing links on this page, or delete those that are no longer needed or have expired.AnQiCMS provides a clear interface to ensure that you can easily maintain these external resources.According to the update log, AnQiCMS v2.1.1 also added API interfaces to support the addition and deletion of friend links, which provides more flexibility for users with customized needs.

Correctly call to display the friend link in the website template

After setting up the back-end of the friend links, the next step is to display them on your website's front page.AnQiCMS through its powerful template tag system makes it very simple to call data in the template.We will uselinkListTag to get and display the friend link.

First, open the file in your website template that needs to display the friend link, which is usually the footer file, or a specific area on the homepage, or even a dedicated friend link page.

You can use{% linkList 变量名称 %}This structure is used to call the friend link data. For example, you can name the variablefriendLinks.

{% linkList friendLinks %}
    {% if friendLinks %}
    <div class="footer-links-section">
        <h3>友情链接</h3>
        <ul class="friendship-links-list">
            {% for item in friendLinks %}
            <li>
                <a href="{{item.Link}}" {% if item.Nofollow == 1 %} rel="nofollow"{% endif %} target="_blank" title="{{item.Remark}}">
                    {{item.Title}}
                </a>
            </li>
            {% endfor %}
        </ul>
    </div>
    {% endif %}
{% endlinkList %}

In the above code snippet:

  • {% linkList friendLinks %}The statement tells AnQiCMS to retrieve all friend links and store them in a namedfriendLinks.
  • {% if friendLinks %}Is a conditional judgment to ensure that the entire block is rendered only when there is friend link data, to avoid the page appearing with empty titles or empty lists.
  • {% for item in friendLinks %}Loop throughfriendLinksEach item in the friend link array. Inside the loop,itemRepresents the current friend link object.
  • {{item.Link}}Used to output the URL address of the friend link.
  • {{item.Title}}Used to output the display name of the friend link.
  • {% if item.Nofollow == 1 %} rel="nofollow"{% endif %}Check if the link is marked as in the backgroundnofollow. If it is, then<a>the tag withrel="nofollow"Property.
  • target="_blank"Properties are usually used to make links open in a new window or tab to preserve the current browsing session of the user on your website.
  • title="{{item.Remark}}"The notes set in the background can be used as links.titleAttribute, when the mouse hovers over it, a note will be displayed to help improve the user experience.

By using such a simple template code, you can dynamically display the friendship links configured on the back-end of your website on the front-end.Please note that it is recommended to add appropriate CSS styles to the link of friendship in order to keep the website neat and provide a good user experience, making it consistent with the overall design style of the website.At the same time, regularly checking the validity of friendship links, deleting invalid links, is an important part of maintaining website health.

Frequently asked questions about friendship links.

What is the role of the "Nofollow" attribute in the friend link? Answer: When setting up friend links in AnQiCMS, if the "Nofollow" attribute is checked, the system will add it to the HTML code of the link.rel="nofollow"This means that search engines usually do not pass this link as a weight when crawling websites, which helps inform search engines that this link is not an endorsement of your website's votes.This is usually used to avoid passing weight to untrusted external websites, or to comply with specific search engine guidelines.

Ask: How to manage friendship links in AnQiCMS backend? Answer: You can log in to the AnQiCMS backend management interface, then navigate to the "Function Management" section, where you can find and click the "Friend Links" option.After entering, you can conveniently add new friendship links, edit the names, URLs, notes of existing links, and whether to set the Nofollow attribute, as well as delete links that are no longer needed.

Ask: Where should the friendship link be placed on the website? Answer: Friendship links are usually placed at the bottom (footer) of a website or on a dedicated "Friendship Links" page.This makes it convenient for users to find information without disrupting the reading experience of the main content of the website.According to the design style of the website and your SEO strategy, it is also appropriate to display it in the sidebar or other less noticeable but easily accessible locations in moderation.

Related articles

How to add and manage multilingual sites in AnQiCMS and implement front-end language switching function?

As an experienced AnQiCMS website operations manager, I am well aware of the key role of building and managing multilingual websites in expanding the market and serving global users.AnQiCMS with its flexible multi-site management and powerful template engine provides an efficient solution to achieve this goal.This article will elaborate on how to set up a multilingual site in AnQiCMS and implement the language switching function on the front-end, helping you easily navigate global operations.

2025-11-06

How to configure the AnQiCMS TDK (Title, Description, Keywords) tag feature for page SEO optimization?

AnQiCMS (AnQiCMS) is an enterprise-level content management system developed in Go language, which has fully considered the needs of search engine optimization (SEO) from the beginning of its design.Among them, the fine-grained configuration of TDK (Title, Description, Keywords) tags is a key factor in improving the visibility of the website in search engines and attracting users to click.

2025-11-06

What types of pseudo-static rules are built into the AnQiCMS system, and how to customize the URL structure?

As a senior CMS website operation personnel of a security company, I know that a friendly and efficient URL structure is crucial for the SEO performance and user experience of a website.AnQi CMS provides high flexibility in the configuration of pseudo-static rules, whether it is for beginners or advanced optimizers, they can find suitable solutions.

2025-11-06

How to enable Markdown editor in AnQiCMS and display mathematical formulas and flowcharts correctly?

HelloAs a website operator who is well-versed in the operation of AnQiCMS, I fully understand the importance of displaying complex information such as mathematical formulas and flowcharts in content creation.High-quality, interactive content is the key to attracting and retaining users.I will explain to you in detail how to enable Markdown editor in AnQiCMS and ensure that mathematical formulas and flowcharts can be displayed correctly.

2025-11-06

How to implement the 'Time Factor-Scheduled Release' feature in AnQiCMS to improve operational flexibility?

As an experienced website operator who deeply understands the operation of AnQiCMS, I know that the timeliness and strategic release of content is crucial to attracting and retaining users in a rapidly changing online environment.AnQiCMS fully understands this and has specially designed the 'Time Factor-Scheduled Publishing' feature, which plays a key role in enhancing operational flexibility in my daily work.The "Time Factor - Scheduled Release" feature, as the name implies, allows operators to preset the release time of content.

2025-11-06

How effective is the anti-crawling interference code and image watermark function of AnQiCMS in protecting the copyright of original content?

As a user of Anq CMS who is well-versed in website operation, I am very familiar with the copyright challenges faced by content creators on the Internet.In the era where content is king, the value of original content is self-evident, but the phenomena of content theft and malicious collection are also increasingly prevalent.AnQi CMS fully understands this and provides built-in anti-collection interference codes and image watermark functions, aimed at providing operators with powerful copyright protection tools.

2025-11-06

What are the core advantages and main application scenarios of the multi-site management function of AnQiCMS?

As a senior website operator, I know that in the increasingly complex digital marketing environment, efficiently managing multiple websites is crucial for enterprises and content creators.AnQiCMS (AnQiCMS) boasts a powerful architecture based on the Go language, providing an excellent solution to meet this multi-site management need.The multi-site management function is not only a major highlight of the system, but also the key to improving operational efficiency and expanding business.

2025-11-06

How to customize AnQiCMS's flexible content model to adapt to the display needs of different types of business content?

As a website operator who is deeply familiar with the operation of AnQiCMS, I know the core position of content in digital marketing and user experience.An efficient content management system, one of its greatest values is that it can flexibly adapt to the needs of content display in various business scenarios.AnQiCMS excels in this regard, its 'flexible content model' is the key tool for us to achieve this goal.

2025-11-06