Under the multi-site management mode, how does AnQiCMS contact information label call data from a specified sub-site?

Calendar 👁️ 64

AnQiCMS under the multi-site management mode provides great flexibility for content operators. When you need to display unique contact information in a common template according to different sub-sites, the contact label of AnQiCMS and itssiteIdThe parameter can fully show its strength.As an experienced website operation expert, I deeply understand the importance of this fine management for improving user experience and operational efficiency.Today, let's delve into how to flexibly call the contact information data of a specified sub-site in the AnQiCMS multi-site mode.


AnQiCMS multi-site management: personalized display under a unified architecture

One of the core strengths of AnQiCMS is its powerful multi-site management function.It allows you to create and independently manage multiple brand websites, product sub-sites, or regional sites under the same system architecture.This pattern greatly reduces repetitive work and improves resource integration efficiency.Although the underlying system is shared with AnQiCMS, each sub-site has an independent database, template configuration, and content data, including crucial contact information.

In the operation, we often encounter such a scenario: we hope that all child sites can share a set of beautifully designed website templates, but the footer, sidebar, or "Contact Us" page needs to display each child site's own contact phone number, address, or social media account.At this point, if each child site needs to modify the template separately, it will undoubtedly bring about huge maintenance costs.The contact label and itssiteIdThe parameter is designed to solve this pain point.

Contact information tag: default call to the specified site data

AnQiCMS provides convenientcontactThe label used to call the data configured in the background "Contact Settings" in the template.By default, when you use this tag directly in the template, it will intelligently retrieve the contact information of the current visited site.

{# 默认调用当前站点的联系电话 #}
联系电话:{% contact with name="Cellphone" %}
{# 默认调用当前站点的联系邮箱 #}
联系邮箱:{% contact with name="Email" %}

When visiting Subsite A, the template will display the contact phone number and email configured for Subsite A in the background.If you visit sub-site B, the data of sub-site B will be displayed.This is very convenient for displaying the current site information.

However, when the requirements upgrade, it needs to be explicitly specified in a template to call the data from *another* sub-site.siteIdThe parameters come into play.siteIdAllow you to precisely tell the system which specific child site's contact information you want to obtain.

Reveal the core features: usingsiteIdCall data from the specified child site

The key to calling data from a specific sub-site in multi-site mode is to use it correctlycontactlabel'ssiteIdparameter.Each child site created in the AnQiCMS backend "Multi-Site Management" is assigned a unique numeric ID by the system.You can find this ID by viewing the "Multi-site Management" list, or by looking at the URL in the browser address bar when editing a sub-site.

Assuming you have the following two sub-sites:

  • Main site (ID: 1):Used mainly for brand display, contact phone number is400-123-4567.
  • Branch A site (ID: 2):Used for specific area services, contact phone number is010-88889999.

Now, you want to display the contact information of Branch A in addition to the main station's contact information on a specific page of the main site. You can do this in the template:

  1. Contact the main site of the current station:

    {# 调用当前主站(SiteId为1)的联系电话 #}
    主站客服电话:{% contact with name="Cellphone" siteId="1" %}
    

    Or more succinctly, since it is the current site, it can also be omittedsiteId:

    主站客服电话:{% contact with name="Cellphone" %}
    
  2. Contact the contact information of Branch A site:

    {# 调用分公司A(SiteId为2)的联系电话 #}
    分公司A电话:{% contact with name="Cellphone" siteId="2" %}
    

In this way, even if you are in the template environment of the main site, you can clearly obtain and display the contact information of Branch A.

If you need to store the data obtained into a variable for subsequent complex logic judgment or formatted output, you can operate as follows:

{# 获取主站点的联系人,并赋值给变量mainSiteContact #}
{% contact mainSiteContact with name="UserName" siteId="1" %}
主站联系人:{{ mainSiteContact }}

{# 获取分公司A站点的邮箱,并赋值给变量branchAEmail #}
{% contact branchAEmail with name="Email" siteId="2" %}
分公司A邮箱:{{ branchAEmail }}

You can easily integrate contact information from different sub-sites into a template without having to create a separate template file for each site, which greatly improves the template reuse rate and the flexibility of content management.

actual application scenarios and operation thinking

This feature has a wide range of application value in actual operation:

  • Unified footer management:You can design a universal footer template that includes the main site's copyright information, and dynamically displays the exclusive contact address for the visitor's sub-site, or lists the key contact information of all subsidiaries uniformly across all sites.
  • Personalized landing page:Quickly create multiple sub-site landing pages for different marketing activities or regions, they share the same core template but only need to go throughsiteIdThe parameter can accurately display the unique contact information of the event or region, improving the conversion rate.
  • Multilingual site:If your multi-site is to support users of different languages, throughsiteIdContact information for the corresponding language site can ensure that users receive localized support.
  • Operation efficiency optimization:When contact information needs to be updated, you can modify it in one place (i.e., the backend configuration of the corresponding sub-site), and all calls to thesiteIdThe templates will automatically update, avoiding the cumbersome manual replacement work.

AnQiCMS with this meticulous functional design truly achieves the goal of letting technology serve operations, making the complex multi-site management simple and efficient.


Summary

Under the multi-site management mode of AnQiCMS,contactLabel combinationsiteIdThe parameter provides powerful and flexible data calling capabilities for website content operators.It is easy to display personalized content under a unified template or to integrate cross-site information.Mastering this skill will help you manage and maintain your multi-site network more efficiently, providing users with more accurate and friendly access experiences.


Frequently Asked Questions (FAQ)

Q1: How do I know the parameters of my child sites?siteIdare?

A1:In the left navigation bar of the AnQiCMS backend management interface, click "Multi-site Management" and you will see a list of all created child sites.Each child site will usually display a unique numeric ID next to it.idThisidis what you need to usesiteId.

Q2: If not specified in the templatesiteIdthe contact information tag will call data from which site?

A2:By default, if the current page of the template does not specify explicitlysiteIdThe contact information label will automatically call the contact information data of the current visited site. For example, when the user visits sub-site A, it is not specified.siteIdofcontactThe label will display the contact information of Subsite A; when the user accesses Subsite B, Subsite B's data will be displayed.This ensures the correctness of data display when in single-site mode or when not cross-site calling.

Q3: Can I call the contact information of multiple child sites at the same time in a template?

A3:Of course you can. You just need to call it each time.contactwhen using tags, bysiteIdSpecify different sub-site IDs. For example, you can display the main site's switchboard phone number and the customer service phone number of a specific branch on the footer of a single page by calling twicecontactLabel, and pass in the correspondingsiteId.

Related articles

How to use the `{% contact %}` tag to accurately call the value after customizing the contact information field?

As an experienced website operations expert, I am well aware of the importance of flexible content display for website operation efficiency and user experience.AnQiCMS (AnQiCMS) offers great customization, making it extremely convenient when handling seemingly simple yet crucial information such as website contact details.Today, let's delve into how to accurately call the values in the contact information field you customized in the Anqi CMS backend through the `{% contact %}` tag in the frontend template.--- ## AnQi CMS Template

2025-11-06

Does AnQiCMS support adding YouTube channel or video link in the contact information?

As an experienced website operations expert, I am happy to give you a detailed explanation of the function of adding a YouTube channel or video link in the contact information of AnQiCMS and the operation strategy behind it. --- ## AnQi CMS: Flexible integration of YouTube content, empowering your multimedia marketing strategy In today's digital age, video content has become an indispensable carrier for brand interaction with users and conveying information.

2025-11-06

How can I add LinkedIn or Instagram personal homepage links to the contact information on AnQiCMS?

AnQiCMS, with its high efficiency and flexibility, has become a powerful assistant for many small and medium-sized enterprises and content operation teams.In today's digital marketing era, a website is not only a platform for information release, but also an important window for connecting with users and showcasing the brand image.While social media platforms like LinkedIn and Instagram play a crucial role in professional communication and visual marketing.

2025-11-06

Is the AnQiCMS contact information tag integrated with emerging social platforms such as Tiktok, Pinterest, etc?

I am glad to discuss with you the capabilities of Anqi CMS in social media integration.As an experienced website operations expert, I fully understand the importance of keeping up with the times in online touchpoints for corporate brand promotion and user interaction.About whether the AnQiCMS contact information tag has integrated emerging social platforms such as Tiktok, Pinterest, etc.This question, I can give a clear and inspiring answer.

2025-11-06

What is the specific usage method of the `siteId` parameter in the `{% contact %}` tag?

In AnQiCMS's powerful feature system, multi-site management is undoubtedly a highlight, making it easy for enterprises and operators to deal with the complex needs of multiple brands, sub-sites, or content branches.In our daily website template development and content operations, the `{% contact %}` tag is a powerful helper for displaying website contact information.

2025-11-06

Can different AnQiCMS sub-sites set completely independent contact information sets?

As an expert deeply familiar with website operations, especially one who has been deeply involved in the AnQiCMS platform for many years, I am very happy to discuss with everyone a common yet crucial issue: 'Can different AnQiCMS sub-sites set up completely independent contact information sets?'}]This question is directly related to the flexibility and efficiency of website operations for enterprises that need to manage multiple brands, multiple regional businesses, or have different product lines.

2025-11-06

How to ensure the uniformity and independence of contact information between multiple sites and avoid data confusion?

AnQiCMS's excellent performance in multi-site management allows content operators to easily manage multiple brands or projects without getting lost in a sea of information.How to cleverly handle the contact methods between different sites, ensuring the uniqueness of each site while also realizing the unified display of certain information to avoid data confusion is a focus of many operators.As an experienced website operation expert, I will deeply analyze this strategy by combining the characteristics of AnQiCMS.

2025-11-06

Does AnQiCMS provide a feature for batch updating or synchronizing contact information to all child sites?

As an experienced website operations expert, I know how important efficiency and consistency are when managing multiple sites.Especially for enterprises with multiple brands, sub-sites, or content branches, how to efficiently maintain core information such as contact details is an indispensable topic in daily operations.Today, let's delve into the performance of AnQiCMS (AnQiCMS) in the function of 'batch updating or synchronizing contact information to all child sites'.First, let's clarify the core design philosophy of AnQi CMS in terms of multi-site management.Based on the documents at hand

2025-11-06