How to implement unified management and display of multi-site content on the front end in AnQiCMS?

Calendar 👁️ 76

In AnQiCMS, managing and displaying the content of multiple websites is a common need for many operators, especially when you need to manage multiple brand sites, product sub-sites, or provide customized content for users in different regions or languages.AnQiCMS was designed with this in mind from the beginning, providing a flexible and efficient solution that allows you to easily manage the content of multiple front-end sites from a single backend.

Backend unified management: one system, multiple sites

One of the core advantages of AnQiCMS is that it supports multi-site management, which means you do not need to deploy a separate CMS system for each website.All sites, regardless of content type, language, or target audience, can be managed through the same AnQiCMS backend.

When you need to create a new site in AnQiCMS, the operation process is very intuitive.Navigate to the "Multi-site Management" feature in the backend, and you will see an option to "Add a New Site".Here, you need to configure some basic information for the new site:

  • Site name: It makes it easy for you to identify and distinguish different sites in the background.
  • Site root directory: AnQiCMS will create an independent storage space for each site, mainly used to store the site's cache, uploaded files, and other data, ensuring data isolation and non-interference between sites.You can specify a unique directory name for the new site.
  • website address: This is the domain name or URL used by users to access the new site.
  • Administrator account and password: Set up independent backend login credentials for the new site, for fine-grained permission management.
  • Database nameIt is strongly recommended to configure an independent database for each new site to ensure data independence and security.Of course, if you wish to create multiple databases under the same database service, you can choose to 'reuse the default database account information', just provide the new database name.
  • Select the template to use: Specify a set of frontend display templates for the new site, giving it a unique appearance and layout.

With such configuration, each site has its independent content storage, independent administrator account, and independent front-end template, but their management entry is unified.You can switch and manage all content such as articles, products, categories, single pages, and SEO settings for different sites on the same admin interface, greatly reducing repetitive operations and management costs.

Unified display on the front-end: Flexible cross-site content call

The cleverness of AnQiCMS lies in the fact that it not only implements unified management on the backend, but also provides powerful front-end content call capabilities, allowing you to easily integrate and display content across sites.This means that even if your content is distributed across multiple logical sites, you can flexibly retrieve and display the content of other sites on any frontend site.

The key to realizing this feature lies in the AnQiCMS template tagssiteIdParameters. Almost all tags involving content calls, such asarchiveList(Document list),categoryList(Category list),pageList(Single-page list),navList(Navigation list) evensystem(System information) andcontact(Contact information) etc., all supportsiteIdParameter.

For example, suppose you have a main brand website (Site A, ID 1) and also operate a product introduction website (Site B, ID 2).Now, you want to display the latest product list of the product website (Site B) on the homepage of the main brand website (Site A).You just need to use in the home page template of Site A,archiveListwhen labelingsiteId="2"Just set the parameters:

{# 在Site A的模板中,调用Site B(ID为2)的最新5个产品 #}
{% archiveList latestProducts with siteId="2" moduleId="产品模型ID" limit="5" %}
    {% for product in latestProducts %}
        <div>
            <h3><a href="{{ product.Link }}">{{ product.Title }}</a></h3>
            <p>{{ product.Description }}</p>
        </div>
    {% endfor %}
{% endarchiveList %}

Similarly, you can also aggregate and display popular articles from multiple sub-sites on a portal site; or display contact information from different sub-brands at the bottom of the corporate website. By specifying preciselysiteIdYou can break the content boundaries, achieving real content sharing and unified display.

In addition, AnQiCMS also provideslanguagesThe tag is used specifically for switching and displaying between multilingual sites. If your multiple sites correspond to multiple language versions of the same content, throughlanguagesLabel, allowing users to conveniently switch between different language sites while ensuringhreflangProper configuration of SEO elements to help your website gain better visibility globally.

Application scenarios in practice

This capability of unified management and display across multiple sites provides a solid foundation for various complex operational needs:

  • Corporate group portalThe main site serves as a brand image display, with each sub-site responsible for specific product lines or service introductions. The main site can optionally aggregate and display the latest dynamic information of each sub-site.
  • Multilingual international websiteTo provide localized content for different countries or regions, each language version is an independent site, throughsiteIdEnable language switching between pages, enhance user experience, and optimize international SEO.
  • Content aggregation and distributionOperate an industry portal website, manage the content of different topics or channels separately through independent "sites", and then integrate and display them uniformly on the main portal page, making it convenient for content editing and publishing while maintaining a clear structure.

In summary, the multi-site management feature of AnQiCMS makes content operation more efficient and flexible.It simplifies the originally complex maintenance of multiple websites, empowering you to freely arrange content between sites with powerful frontend calling capabilities, and builds a powerful, smooth digital asset matrix.


Frequently Asked Questions (FAQ)

1. How do I know each site?siteIdWhat is it?

In AnQiCMS backend, when you enter the 'Multi-site Management' page, you will see a list of all the sites you have created. Typically, each site will have a unique ID, and you can find the corresponding one in this list.siteId. This ID is the unique credential used internally to identify the site, and it needs to be used accurately when calling cross-site content in the template.

2. Will calling a large amount of content from multiple sites on a front-end page affect website performance?

AnQiCMS is developed in Go language and has the architectural advantages of high performance and high concurrency.We also considered the efficiency of content calls during design. However, calling too much content from different sites on a single page may still increase the server load and page loading time.It is recommended to follow the principle of 'loading on demand, and minimal invocation' in design, for example, limiting the number of content calls (limitParameters), or utilize the page caching mechanism to optimize performance.

3. Can I let different sites share the same article or product data completely, instead of calling and displaying across sites?

The multi-site design concept of AnQiCMS provides an independent database for each site to ensure data isolation and management flexibility.Therefore, by default, an article or product data belongs to a specific site.Cross-site calling is a "display" mechanism, not a "sharing" mechanism, that is, data is pulled from Site A to Site B for display, but the data itself is still stored on Site A.If you indeed need to make multiple sites share the same content data completely, you may need to consider manually synchronizing the same content to other sites at the time of content publishing (through the content collection and batch import function of AnQiCMS, or the API interface can simplify this process), or through customized development to achieve a deeper level of data sharing logic.

Related articles

How can AnQiCMS flexibly customize the content model to meet diverse display needs?

## Harness AnQiCMS: Flexible Content Model Customization, Unlock the Potential of Diverse Display Methods In today's digital age, websites are no longer platforms for displaying a single content form.Whether it is a corporate website, e-commerce product catalog, industry information station, or personal blog or online education platform, the core content is often very different, with unique structures and display requirements.Traditional CMS systems often rigidly limit content to fixed frameworks such as "articles" or "products", which undoubtedly presents many challenges for operators who pursue personalization and professionalism.

2025-11-07

What are other practical application scenarios of the filter in AnQiCMS templates, besides direct display or assignment?

The template language of AnQiCMS (AnQiCMS) provides rich features, not limited to direct data display or simple assignment.Among them, filters play an important role, which can transform, format and process variable values in templates to achieve more flexible and dynamic content display.When we delve deeper into the practical scenarios of these filters, we will find that they greatly enhance the expression capabilities and development efficiency of templates.

2025-11-07

In the multilingual AnQiCMS site, can the `contain` filter correctly judge different language keywords?

In the AnQiCMS multilingual site, can the `contain` filter correctly judge keywords in different languages?AnQiCMS as a feature-rich enterprise-level content management system, with its powerful multilingual support capabilities, enables content operators to easily reach a global audience.However, in the actual content management and display, we often need to perform keyword detection or filtering.At this point, a key question arises: Can the `contain` filter in the template accurately identify keywords when faced with content in different languages?

2025-11-07

In `archiveDetail`, the `ContentTitles` field returns an array, how can you further process these title lists using array filters?

When managing content in AnQi CMS, the `archiveDetail` tag on the document detail page is very powerful, as it can help us obtain rich information about the current document.Among them, the `ContentTitles` field is a particularly useful data structure that returns an array containing the hierarchical information of all titles (such as H1, H2, H3, etc.) in the document content.This provides us with great flexibility, which can be used to build article catalogs, intelligent navigation, and even content analysis.`ContentTitles`

2025-11-07

How to configure AnQiCMS multilingual support to switch and display content correctly?

AnQiCMS provides powerful multilingual support features, helping us easily promote website content to global users.However, in order to correctly switch and display multilingual content, we need to understand the design approach of AnQiCMS in this regard and configure and manage it through several key steps.It mainly achieves independent content for different language versions by combining "multi-site management", and at the same time provides "default language packages" and "translation tags" to handle the static text in the system built-in text and templates.## Understanding AnQiCMS's multilingual mechanism First

2025-11-07

How to use AnQiCMS pseudo static and 301 redirect function to optimize URL structure to improve SEO display effect?

In website operation, the structure of URL has a significant impact on search engine optimization (SEO) effectiveness.A clear, concise, and descriptive URL that can improve user experience and help search engines better understand page content, thereby improving crawling efficiency and ranking.AnQiCMS is a powerful content management system that provides comprehensive pseudo-static and 301 redirect functions, helping us create an ideal URL structure.### Understanding SEO-friendly URLs and their importance Imagine that

2025-11-07

How does AnQiCMS's scheduled publishing function ensure that content is displayed accurately on the website as planned?

In today's fast-paced digital world, the timing of publishing website content is often as important as the content itself.In order to coordinate with market activities, seize hot news, or simply to maintain the regularity of content publication, the ability to accurately control the timing of content going live is crucial.AnQiCMS (AnQiCMS) deeply understands this, and its built-in scheduled publishing function is designed to meet this core requirement, ensuring that your website content is displayed accurately and as planned to visitors.### Say goodbye to manual operation

2025-11-07

How to use AnQiCMS template tags to retrieve and display the system configuration information of the website?

In Anqi CMS, the system configuration information of the website is the foundation for its operation, including the website name, Logo, filing number, address, and other core data.This information is usually needed to be dynamically displayed on various pages of the website (such as the header, footer, contact us page, etc.) to maintain consistency.To facilitate template developers and content operators to efficiently manage and display this information, AnQiCMS provides a simple and powerful template tag that allows you to flexibly obtain and display the system configuration of the website.Where is the system setting of AnQi CMS? First

2025-11-07