When using a website content management system, the multi-site feature has always been a topic of great concern.It not only concerns operational efficiency, but also directly affects the organization, display of website content, and smooth switching experience between different sites.For AnQiCMS users, its powerful multi-site function 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.
One of the design初衷 of AnQiCMS is to meet the needs of users to manage 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, an AnQiCMS instance.This pattern has brought profound impact to the display and switching of front-end content.
1. Independent Kingdom: High isolation of content and data
The multi-site feature of AnQiCMS is primarily reflected in its strong isolation of content.Although all sites may run on the same AnQiCMS program, each site is considered an independent entity.This means:
- A standalone domain and entranceEach child 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.
- Standalone data storage: When 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 site will not confuse the brand B site, ensuring the purity of the content and convenience of management.This means that the data we see on the A station is exclusive to the A station, and will not be interfered with by other sites.
- Standalone backend management: Although 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 operational 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.When a user visits a site, they can obtain customized information, avoiding information overload or interference from irrelevant content.
II. Flexible customization: personalized presentation of templates and content
The front-end display of the content management system cannot do without the support of templates. The multi-site function of AnQiCMS allows each site to flexibly choose and customize templates according to its own needs, thereby achieving personalized content presentation:
- Independent theme templateEach site can have its own unique theme template.This means that even different product lines of the same company can be distinguished by different design styles.We can design a stable and elegant template for the enterprise website, a lively shopping-oriented template for the e-commerce sub-site, and even configure optimized interfaces for multi-language sites that cater to different cultural habits.template folder's
config.jsonThe file defines the name, type (adaptive, code adaptation, PC + mobile) and other information of the template, providing a rich selection. - Diversified content modelThe flexible content model of AnQiCMS is one of its core strengths.In a multi-site environment, we can define a dedicated content model for each site.For example, a news and information site can have "article", "special topic" models, while a product display site can have "product", "solution" models.These models determine the structure of content entry on the backend, thereby affecting the display form of content on the frontend.This means that even under the same AnQiCMS instance, the detailed pages of "articles" on different sites can vary greatly in terms of the fields and layouts displayed, due to the different content models they are bound to.
- Fine-grained content display control: AnQiCMS provides powerful template tag functions, such as
archiveDetail/categoryDetail/pageDetailand, these tags can accurately 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.htmlThis brings the display of front-end content to the ultimate level of refinement, ensuring that every page can be presented as needed, whether it is 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 a way that is most suitable for its business needs and brand image while maintaining its independence.
Three, Interconnection: The Mystery of Cross-Site Content Display
The multi-site feature of AnQiCMS is not just simple content isolation, it also provides a clever mechanism to achieve interconnection between sites, especially in the content display aspect:
siteIdThe magic of parametersThis is the core to achieve 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 another site in the current site's template.- Example Case:
- Cross-site Product DisplayA company with multiple sub-brands, its main brand website can display through the homepage
{% archiveList archives with moduleId="2" siteId="其他站点ID" limit="5" %}Label, displaying the latest product list of a sub-brand website under its brand. - 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 friend links: A master site's navigation bar can contain links to all child sites.
- Cross-site Product DisplayA company with multiple sub-brands, its main brand website can display through the homepage
- Example Case: