When using a website content management system, the multi-site feature has always been a topic of concern.It not only concerns operation efficiency, but also directly affects the organization, display of website content, and the smooth switching experience between different sites.For AnQiCMS users, its powerful multi-site feature is the tool to solve this series of challenges.Let's delve into how the multi-site feature of AnQiCMS actually affects the display and switching of front-end content.
The original design of AnQiCMS is one of the purposes to meet the needs of users managing multiple brands, sub-sites, or multi-language content.Through a simple and efficient system architecture, it allows us to easily create and independently manage multiple websites on a single server and one AnQiCMS instance.This pattern has a profound impact on the display and switching of front-end content.
一、独立王国:内容与数据的高度隔离
The multi-site function of AnQiCMS is first reflected in its strong isolation of content.Although all sites may run on the same AnQiCMS program, each site is regarded as an independent entity.
- An independent domain and entryEach sub-site can be bound to an independent domain name, having its own exclusive access address.Users access different sites directly through different domain names, achieving physical separation on the front end.
- Independent data storageIn creating a new site, we need to specify a unique 'site root directory' and 'database name'.This ensures that each site has independent caching, file storage space, and database tables.For example, the content of Product A will not be confused with that of Brand B, ensuring the purity of content and convenience in management.For front-end developers, this means that the data we see from A site is exclusively from A site, and it will not be interfered with by other sites.
- Independent backend managementAlthough we can use the 'Multi-site Management' feature of the main station to unify the entry, each sub-site has an independent backend administrator account and password.This further strengthens the independent operation capabilities between sites, ensuring clear division of content editing and management permissions.
This high degree of isolation allows each site to focus on its specific positioning and target audience, thereby presenting clear and focused content on the front end.Users can obtain customized information when accessing a certain site, avoiding information overload or interference from irrelevant content.
II. Flexible Customization: Personalized presentation of templates and content
Content management system front-end display is inseparable from the support of templates. AnQiCMS's multi-site function allows each site to flexibly select and customize templates according to its own needs, thus realizing the personalized presentation of content:
- Independent theme templateEach site can have its own unique theme template.This means that even products from the same company with different product lines can be distinguished by different design styles to establish brand image.We can design stable and elegant templates for corporate websites, lively shopping-oriented templates for e-commerce sub-sites, and even configure interfaces optimized for different cultural habits for multi-language sites.
config.jsonThe file defines the name, type (adaptive, code adaptation, PC + mobile) and other information of the template, providing a wealth of choices. - Diversified content model:AnQiCMS's flexible content model is one of its core advantages.In a multi-site environment, we can define a dedicated content model for each site.For example, a news information site can have 'articles' and 'special features' models, while a product showcase site can have 'products' and 'solutions' models.These models determine the structure of content entry on the backend, which in turn affects the display form of front-end content.This means that even under the same AnQiCMS instance, the "article" detail pages of different sites can vary greatly in terms of the fields and layouts displayed, as they are bound to different content models.
- 精细化的内容展示控制:AnQiCMS provided powerful template tag functions, such as
archiveDetail/categoryDetail/pageDetailThese tags can precisely control the various components of the content. Furthermore, it supports custom template files, such as specifying exclusive template files for specific category IDs, document IDs, or single page IDs (such aspage/about.htmlorproduct/detail-123.html)。This brings the presentation of front-end content to the ultimate level of refinement, ensuring that every page can be presented as needed, whether it's a special event page or a brand story page, each can have a unique appearance and functionality.
These features work together to ensure that each site can display content in the most suitable way for its business needs and brand image while maintaining its independence.
English: Three, Interconnectivity: The Secrets of Cross-Site Content Display
AnQiCMS's multi-site feature is not just simple content isolation, it also provides a clever mechanism to achieve interconnectivity between sites, especially at the content display level:
siteIdThe magic of parameters:This is the core of cross-site content display. AnQiCMS almost all content template tags (such asarchiveList/categoryList/pageList/system/contact/tdk) are built-in.siteIdParameters. By explicitly specifying the ID of another site in the tag, we can easily call and display any content or configuration information from other sites in the current site's template.- Case Examples:
- Cross-Site Product ShowcaseA company with multiple sub-brands, whose main brand website can display on the homepage through
{% archiveList archives with moduleId="2" siteId="其他站点ID" limit="5" %}Tags, showing the latest product list of a sub-brand website under the company. - Unified Contact InformationIf multiple stations need to display the unified contact information of the headquarters, it can be used in each station template.
{% contact with name="Cellphone" siteId="总部站点ID" %}to pull the contact phone number of the headquarters site. - Global navigation or友情链接: A master site's navigation bar can include links to all sub-sites
- Cross-Site Product ShowcaseA company with multiple sub-brands, whose main brand website can display on the homepage through
- Case Examples: