As an experienced CMS website operation personnel, I fully understand that efficient content reuse and data integration are crucial for improving operational efficiency in multi-site management.The Anqi CMS was designed with the needs of small and medium-sized enterprises, self-media operators, and users with multi-site management requirements in mind. 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 reflects the flexibility and convenience of cross-site document data calls.
AnQi CMS Multi-site Management Basic Architecture
The Safe 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 usually configured to have an independent website root directory and database./app/An independent root directory at the beginning, and assign a new database name to it.This architecture ensures the high isolation and security of data across each site, avoiding data confusion.However, this independence does not mean data barriers, on the contrary, the security CMS provides an elegant mechanism for content to flow between different sites.
siteId参数:实现跨站点数据调用的关键
安企CMS实现跨站点文档数据调用的核心在于其模板标签中普遍支持的siteIdParameter.This parameter is the 'key' that content operation personnel obtain specific site data at the template level.siteId这一重要属性。
When we need to display content from another site at the current site, we just need to specify the target site explicitly in the corresponding template tag.siteIdIt can achieve precise data calls. For example, if you have a main site (site ID 1) and a content distribution site (site ID 2), and the distribution site wants to display a specific article or a list of articles under a certain category of the main site, you can do so by adding the relevant content to the template file of the distribution site.siteId="1"The parameter can be easily implemented.
Specifically, 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" %}English label. This will retrieve the document title of the document with ID 123 in site 3. Similarly, if you want to retrieve 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 operation personnel to build content aggregation pages, such as calling the latest news from all sub-brand websites in the "News Center" of a corporate website; or displaying user reviews from related product sites at the bottom of a product landing page.
Application scenarios and practice of cross-site data calls
Cross-site document data call has significant advantages in various operation scenarios.
Content reuse and integrationThe most direct benefit is to avoid the repeated creation and management of the same content. For example, a company with multiple sub-brands can establish a unified content library as the main site and throughsiteIdParameters distribute specific content to various sub-brand sites. This means that content needs to be created only once and can be displayed in multiple places, greatly enhancing the efficiency of content production.
Build a content aggregation pageEnglish: The operation personnel can use this feature to create rich aggregation pages, summarizing and displaying relevant information from different sites.For example, an industry portal can aggregate the popular articles of its subordinate vertical domain sub-sites.
Unified Resource Management:Not limited to document content, but also includes shared information such as contact details, certain system settings (such as the business registration number of the company headquarters or copyright information), and even the navigation menus or friend links of specific sites, which can besiteIdParameters are used for cross-site calls, realizing unified resource management and display. For example,{% contact with name="Cellphone" siteId="1" %}You can obtain the contact information of the main site.
However, in practical applications, we also need to pay attention to some **practices**.Firstly, although the high-performance architecture of AnQiCMS 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.Suggest considering the localization of content storage and display during design, and only use cross-site calls when absolutely necessary.siteIdEnsure proper documentation is in place for accurate reference during template development and maintenance.Finally, at the content strategy level, ensure the relevance and user experience of cross-site call content within the target site context, avoiding abrupt or disjointed displays.
PasssiteIdParameters, Anqi CMS provides a powerful and flexible tool for website operators, enabling efficient sharing and integration of content while maintaining the independence of the site, thus enhancing the overall operation efficiency and content value.
Common Questions (FAQ)
1. How to obtain the content of a site?siteIdSo that cross-site calls can be made?通常,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 view the ID of the current site on the page through debug mode when developing templates, and then infer the IDs of other sites.siteIdis the value of the parameter.
2. When calling cross-site data, will it affect the SEO of the site being called?Cross-site data calls do not directly affect the SEO of the called site because the content still exists on the original site. However, if a large amount of content is only displayed on other sites through cross-site calls without being fully indexed by the original site, or if the called site does not use it correctlycanonicalLabel points to the original content source, which may cause duplicate content issues. In practice, the site being called should act as the content consumer, usingcanonicalThe tag points to the original publishing site of the content, to clarify the preference of search engines.
3. Can I concentrate all the data of all sites into a main site for management and invocation, while other sub-sites do not store any content?Theoretically, AnQiCMS'ssiteIdThe 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.) aresiteIdAll parameters call the main station data.This will make the child site highly dependent on the main site, and the content management function of the child site's backend will be a mere formality.This approach may be suitable for extreme scenarios of content strong integration, but in most cases, it is a more balanced and robust strategy to retain a portion of core content for each site and share some general or complementary content across sites.