As an experienced CMS website operation person in an information security company, I know that efficient content reuse and data integration are crucial for improving operational efficiency in multi-site management.AnQi CMS was designed with the consideration of small and medium-sized enterprises, self-media operators, and users with multi-site management needs. One of its core strengths is its powerful multi-site management capabilities.This is not limited to the creation and management of independent sites, but also体现在the flexibility and convenience of cross-site document data calls.

Basic architecture of AnQiCMS multi-site management

AnQi CMS allows multiple sites to run independently under the same system environment.At the deployment level, whether it is installed through Docker on the Baota panel or manually configured on a Linux server, each site is typically configured to have an independent website root directory and database.For example, when adding a new site in the Baota panel, the system prompts to specify a site name with/app/Start an independent root directory and assign a new database name to it.This architecture ensures high isolation and security of data across sites, avoiding data confusion.However, this independence does not mean data barriers; on the contrary, AnQi CMS provides an elegant mechanism for content to flow between different sites.

siteIdParameter: the key to implementing cross-site data calls

The core of AnQi CMS in implementing cross-site document data calls lies in the universal support of its template tagssiteIdThe parameter is the 'key' that the content operator uses at the template level to retrieve data from a specified site.In the AnQiCMS template tag system, almost all list or detail tags involving content (such as articles, products, categories, single pages, contact information, etc.) have reservedsiteIdthis important attribute.

When we need to display content from another site on the current site, we just need to specify the target site in the corresponding template tag.siteIdThis can achieve the precise call of data. For example, if you have a main site (site ID 1) and a content distribution site (site ID 2), the distribution site wants to display a specific article of the main site or a list of articles under a certain category, by adding it to the template file of the distribution site.siteId="1"By specifying the parameter, it can be easily achieved.

To be specific, for example, when you need to display the details of a document with site ID 3 on a page of the current site, you can use something similar.{% archiveDetail with name="Title" id="123" siteId="3" %}The label. This will retrieve the document title of site 3 with ID 123. Similarly, to get the list of articles under a category of site ID 2, you can use{% archiveList archives with type="list" categoryId="5" limit="5" siteId="2" %}Label, this will return the latest 5 articles with category ID 5 in site 2.

This design makes content calls extremely flexible. It allows operators to build content aggregation pages, such as calling the latest dynamic of all sub-brand websites in the 'News Center' of a corporate website;Or at the bottom of a product landing page, display user reviews of related product sites.

Application scenarios and practice of cross-site data calls**

Cross-site document data calls have significant advantages in various operational scenarios.

Content reuse and integrationThe most direct benefit is to avoid the repetition of creating and managing the same content. For example, a company with multiple sub-brands can establish a unified content library as the main site and throughsiteIdThe parameter distributes specific content to various sub-brand sites. This means that the content only needs to be created once and can be displayed in multiple places, greatly enhancing content production efficiency.

Build a content aggregation page: Operators can use this feature to create rich aggregation pages, displaying relevant information from different sites aggregated together.For example, an industry portal can aggregate the popular articles of its subordinate vertical domain sub-sites.

Unified Resource ManagementThis is not limited to document content, but also includes contact information, certain shared information in system settings (such as the registration number of the company's headquarters or copyright information), even specific site navigation menus or friend links, which can be accessed throughsiteIdParameters are used for cross-site calls to achieve unified resource management and display. For example,{% contact with name="Cellphone" siteId="1" %}You can get the contact information of the main site.

However, in practical applications, we also need to pay attention to some**practices.Although AnQiCMS's high-performance architecture in Go language can effectively handle high-concurrency requests, excessive and unoptimized cross-site data calls may still have a slight impact on website performance.It is recommended to prioritize the localization of content storage and display during design, and to use cross-site calls only when absolutely necessary for sharing or integration.Secondly, be sure to clearly plan each site'ssiteIdPlease ensure that you document the records well, so that accurate referencing of the target site can be done during template development and maintenance.Finally, at the content strategy level, ensure that the content called across sites is relevant in the context of the target site and provides a good user experience, avoiding abrupt or disjointed displays.

BysiteIdParameters, AnQi CMS provides a powerful and flexible tool for website operators, enabling efficient sharing and integration of content while maintaining site independence, thereby enhancing overall operational efficiency and content value.


Frequently Asked Questions (FAQ)

1. How to obtain a site'ssiteIdso as to make cross-site calls?Generally, in the AnQiCMS backend multi-site management feature, the system will assign a unique numeric ID to each site created.You can view and record these IDs in the multi-site list, or, during template development, view the ID of the current page's site through debug mode, and then infer the IDs of other sites.In the template tag, you use this numeric ID directly assiteIdjust the value of the parameter.

2. Will cross-site call data affect the SEO of the called site?Cross-site data calls do not directly affect the SEO of the called site, as the content still exists on the original site. However, if a large amount of content is only displayed on other sites through cross-site data calls without being fully indexed by the original site, or if the called site does not use it correctlycanonicalThe tag points to the original content source, which may cause duplicate content issues. **In practice, the called site as the content consumer should usecanonicalThe tag points to the original site of the content to clarify the search engine's preference.

3. Can I centralize the data of all sites to a main station for management and calling, while other sub-stations do not store any content?Theoretically, AnQiCMS'siteIdThe mechanism allows you to do this at a technical level, that is, all content is stored centrally on the main site (site ID 1), and the templates of other sub-sites (site ID 2, 3, etc.) pass throughsiteIdAll parameters call the main station data. This will make the sub-station heavily dependent on the main station, and the content management function of the sub-station backend will be virtually non-existent.This approach may be suitable for extreme scenarios of strong content integration, but in most cases, it is a more balanced and robust strategy to retain some core content on each site and share some common or complementary content through cross-site calls.