AnQiCMS was designed with full consideration of the needs of enterprises and content operators for multi-site management, and is committed to providing a highly efficient and independent solution.When you create multiple sites in AnQiCMS, the system ensures that each site's page content can be displayed independently, without interference, while also allowing for limited cross-site content interaction when needed.

Logical isolation and data independence of sites

AnQiCMS ensures that content from multiple sites is displayed independently by its logical isolation and data management for each site.In the system, each site created is considered a separate operating entity.This means that each site has its own independent configuration information, including domain name, file storage path, and more importantly, they can have their own independent database.

Flexible content model support

The flexibility of the content model is another key factor for AnQiCMS to maintain the independence of the site's content.Each site can customize a unique content model according to its specific business needs.For example, an e-commerce site may need a "product" model containing fields such as price and inventory; while a news and information site may need an "article" model containing fields such as author and source.

Intelligent recognition and invocation of template system

The final decision on how content is presented to users is the site's template system.AnQiCMS uses a highly flexible and intelligent template engine (similar to Django templates), ensuring that each site's template can be independently customized and called, thus achieving independent display of content.

Each site can have its own independent set of template files. The system determines which site's template to load by identifying the current visited domain. For example, accessingsiteA.comWill load the template for site A./template/siteA_theme/in the directory, while accessingsiteB.comWill load the template for site B./template/siteB_theme/Within these templates, when usingarchiveList/categoryDetailorpageDetailWhen using tags to obtain content, AnQiCMS engine will automatically identify the current site context and fetch data from the associated database of the current site for rendering.This means that even if the template code structure of two sites is similar, due to the different site contexts they are in, the actual displayed content will be independent data for each.

Further more, template tags will default to fetching data from the current site without any additional specificationsiteIdParameter.This context-sensitive mechanism greatly simplifies the work of template developers, allowing developers to focus on the style and content layout of the current site without worrying about confusing data from other sites.siteIdParameters allow cross-site content calls in special cases, but this is an explicit, purposeful action that will not cause passive confusion.In addition, AnQiCMS also supports specifying custom templates for specific categories, documents, or single pages, which gives each site ultimate flexibility and independence in content display.

Through the above progressive mechanism, AnQiCMS provides strong independence guarantees for each site from data storage, content structure definition to the final page rendering, making it possible for content under multi-site management to be displayed clearly and accurately independently.


Common Questions (FAQ)

1. How does AnQiCMS ensure the independence of multi-site content at the file system level?

AnQiCMS ensures content independence at the file system level by setting up a separate website root directory for each new site. When creating a new site, you need to specify a different website root directory (for example/app/dev_anqicms_comThe directory will be used to store the cache, uploaded files, images, and other resources for the site.This means that uploaded images and files from different sites are stored in their respective directories, without overlapping or confusing.Combining with an independent database, data and files are effectively isolated.

2. Can I reference or display content from another site on a single site?

Yes, AnQiCMS provides this flexibility. Although by default each site's content is independent, but by explicitly using in template tags,siteIdParameters, you can implement cross-site content referencing and display. For example, in the template of site A, you can use{% archiveList archives with siteId="站点B的ID" limit="5" %}Fetch and display the latest article list of Site B. This allows you to achieve necessary content interlinking between sites while maintaining the independence of each site.

3. If my multiple sites use the same template theme, will their content display independently?