How to call language data from other sites in the AnQiCMS multi-site environment?

Calendar 81

Cross-site language data seamless call: AnQiCMS multi-site environment content operation tool

As an expert well-versed in website operations, I am fully aware of the challenges faced in managing content in a multi-site, multi-language environment.The繁琐的重复工作、data synchronization issues often make the operator feel inadequate.However, AnQiCMS, with its powerful multi-site management and multilingual support capabilities, provides us with a graceful and efficient solution.Today, let's delve into how to cleverly call language data from other sites in the multi-site environment of AnQiCMS to achieve efficient content reuse and collaboration.

AnQiCMS was designed from the beginning to fully consider the needs of enterprises and content operation teams for multi-site management.It not only allows you to create and independently manage multiple sites, but more importantly, it provides a powerful mechanism for cross-site data sharing and resource integration.With its built-in multilingual support, this means you can easily handle content display needs for different brands, regions, and even languages in a unified backend.

Core strategy:siteIdThe magic of parameters

In the AnQiCMS template tag system, the key to calling language data from other sites lies in a seemingly simple yet powerful parameter: siteIdThis parameter is almost present in all tags related to content, configuration, and navigation, allowing you to explicitly specify from which site to retrieve data, even if the current user is visiting another site.

When you configure multiple sites in the AnQiCMS background, each site will be assigned a uniquesiteId. By passing this target site'ssiteIdYou can accurately pull the specific data under the site, whether it is system configuration, contact information, or specific articles, product information.

1. Call system-level and contact information

Imagine you have a main brand website and multiple sub-sites for different regions or languages.On the footer of the sub-site or the "About Us" page, you may want to display the unified contact information of the main brand or the company registration information.siteIdit can be put to use.

For example, you can call the main station's website name, Logo, filing number, as well as contact phone number and email:

{# 假设主站的siteId是1 #}
<p>
    本网站由 {% system with name="SiteName" siteId="1" %} 运营。<br>
    备案号:<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" siteId="1" %}</a> <br>
    联系电话:{% contact with name="Cellphone" siteId="1" %}
</p>

By specifyingsiteId="1"Even if the current page belongs to another site, it will accurately retrievesiteIdthese systems and contact information from site 1 to ensure brand consistency.

2. Cross-site reference content details and list

Furthermore,siteIdDemonstrating its true power in the calling of content details and lists. Assuming your English sitesiteId=2There is an extremely important product introduction on it, you hope to be on the Chinese site(siteId=3On a specific page, refer to the title, description, or even part of this introduction without repeating it on the Chinese site.

  • Get the details of a specific article or product:
{# 假设英文站(siteId=2)有一篇ID为100的产品文章 #}
{% archiveDetail englishProduct with name="Title" id="100" siteId="2" %}
<h3>我们的英文站点推荐:{{ englishProduct }}</h3>

{% archiveDetail englishProductDesc with name="Description" id="100" siteId="2" %}
<p>摘要:{{ englishProductDesc }}</p>

here,siteId="2"Ensure that the article title and description with ID 100 are obtained from the English site rather than the current Chinese site.

  • Display the list of popular articles from other sites:You can even display the latest or most popular articles from other sites in the sidebar or homepage of the current site.
{# 显示英文站(siteId=2)最新的5篇文章 #}
<h3>英文站最新动态:</h3>
<ul>
    {% archiveList englishPosts with type="list" limit="5" siteId="2" %}
        {% for item in englishPosts %}
            <li><a href="{{ item.Link }}">{{ item.Title }}</a></li>
        {% endfor %}
    {% endarchiveList %}
</ul>

This not only enriches the content of the current site, but also provides a cross-site browsing entry for users, improving the overall user experience. Similarly,categoryList/pageList/tagListtags also supportsiteIdParameters, allowing you to flexibly call the category, single-page, or tag data of other sites.

3. Unified navigation and breadcrumb path

For brands with complex site structures, a unified navigation menu and clear breadcrumb path are crucial.navListandbreadcrumbTags also support.siteIdShare menu structure or build a coherent navigation path across different sites.

{# 调用主站(siteId=1)的顶部导航 #}
<nav>
    {% navList mainNav with typeId="1" siteId="1" %}
        <ul>
            {% for item in mainNav %}
                <li><a href="{{ item.Link }}">{{ item.Title }}</a></li>
            {% endfor %}
        </ul>
    {% endnavList %}
</nav>

This is very helpful in maintaining the unity of brand image and smooth transition of users between different sites.

Invoke the self-information of the multilingual site:languagesTag

Except throughsiteIdPrecisely calling specific data from other sites, AnQiCMS also provides a multi-language environment specifically designedlanguagesLabel.This tag is not used to pull the content itself, but to obtain an overview of all language sites in the current multi-site environment, such as their language names, language codes, and corresponding links.

Related articles

What is the role of the `siteId` parameter in AnQiCMS's multi-site management?

As an experienced website operations expert, I have a deep understanding of the powerful functions of AnQiCMS in actual operation, especially the exquisite design in multi-site management.Today, let's delve deeply into a seemingly minor but crucial parameter in AnQiCMS multi-site management, `siteId`. What role does it play, and how can we fully utilize it to optimize our content operation strategies.--- ### The core role and practice of the `siteId` parameter in AnQiCMS multi-site management AnQiCMS

2025-11-06

How to get the configuration information of different multilingual sites using the `system` tag?

## The Anqi CMS Multilingual Site Operation Manual: Skillfully Using `system` Tags to Retrieve Configuration Information As a senior website operator, we are well aware that efficient content management and flexible configuration adjustments are the keys to success in the ever-changing network environment.AnQiCMS is an enterprise-level content management system developed based on the Go language, which provides us with great convenience with its powerful multi-site and multi-language support.Today, let's delve deeply into a seemingly simple but powerful template tag in AnQiCMS——`system`

2025-11-06

How does the `SiteName` field in AnQiCMS support multilingual title display?

Good, as an experienced website operation expert, I am happy to delve deeply into how the `SiteName` field in AnQiCMS supports multi-language title display and convert it into an article that is practical and easy to understand. --- ## AnQiCMS multilingual实战:How to accurately reach global users with `SiteName` title?

2025-11-06

How to get the language configuration information of the current site using the `system` tag?

## Enterprise CMS Template Development: Using the `system` tag to intelligently obtain the current site language configuration As an experienced website operations expert, I am well aware of the importance of multilingual support for corporate websites and content operations in today's global internet environment.AnQiCMS, this is an enterprise-level content management system built with Go language, which has fully considered this point from the beginning and provides strong multilingual support functions to help users easily expand into international markets.

2025-11-06

How to judge whether the current page is in a multilingual site environment in AnQiCMS template?

As an experienced website operations expert, I am well aware of the importance of how templates intelligently adapt to different language versions in a multilingual site environment.AnQiCMS as an enterprise-level content management system developed based on the Go language, its powerful multilingual and multi-site management features are the key tools for us to achieve this goal.Accurately judge the language environment of the current page in the template, not only can optimize the user experience, but also greatly enhance the website's SEO performance and content operation efficiency.Today, we will delve deeply into the AnQiCMS template

2025-11-06

What development conventions and practices should be paid attention to when developing AnQiCMS multi-language templates?

Under the impetus of the global wave, the multilingual capability of websites is no longer a bonus, but a necessity to reach a wider user base.As an experienced operator of AnQiCMS, I am well aware of the importance of a high-efficiency and maintainable multilingual template for a company to expand into the international market.Today, let's delve deeply into the development conventions and practices to be followed when developing AnQiCMS multilingual templates, so that your website can shine on the global stage.AnQiCMS as a modern content management system developed based on the Go language, with its lightweight

2025-11-06

How to dynamically load language-specific CSS or JavaScript files in AnQiCMS multilingual templates?

I am glad to delve deeply into the strategy of AnQiCMS dynamically loading language-specific resource files in multilingual templates.As an experienced website operations expert, I am well aware that providing customized experiences for users of different languages is very important in today's increasingly globalized world.AnQiCMS strong multilingual support and flexible template engine is the key to achieving this goal.--- ## Unlock the Customized Charm of Multilingual Sites: The Strategy of Dynamically Loading Language-Specific CSS and JavaScript Files in AnQiCMS In today's ever-changing digital world

2025-11-06

How to keep the user's session or status information when switching language sites of AnQiCMS?

AnQiCMS Multi-language Site Switching: Gracefully Maintain User Session and State In today's globalized digital world, a website's ability to serve users in multiple languages is undoubtedly a key to expanding the market and enhancing user experience.AnQiCMS is an enterprise-level content management system developed based on the Go language, and its "multilingual support" feature is undoubtedly one of its core highlights.

2025-11-06