AnQiCMS's modular design philosophy runs through its entire system architecture.It is not a rigid, unified system, but a series of independent and collaborative functional modules.This design pattern makes it possible for the system to be efficient, customizable, and easily scalable, and directly empowers secondary development in a multi-site environment.

Modular architecture: the cornerstone of secondary development

AnQiCMS is developed using Go language, fully utilizing the high concurrency features and the advantages of simplicity and efficiency of Go language.Its modular design means that each feature point, from content publishing to user management, from SEO tools to multi-site support, is relatively independent.This independence is the key to secondary development, allowing developers to modify or extend for specific needs without needing to deeply understand the vast codebase of the entire system.

This decoupled architecture brings significant convenience.Developers can independently upgrade or replace a functional module without causing unexpected effects on other parts.For example, if you need to introduce a new content collection source, you only need to develop the collection module without worrying that the changes will affect the content model or template system.This greatly reduces the risk and maintenance cost of secondary development.

Flexible content model: the tool for customizing content

One of the core highlights of AnQiCMS is its flexible content model.The system内置的文章和产品模型只是起点,operator可以根据business需要custom新的content模型,并为these模型add专属fields。This ability is the embodiment of modular design in content.Each content model can be considered as an independent content unit, with its own data structure and management logic.

Powerful template system: the freedom of frontend development

The template system of AnQiCMS is a paradigm of modular design in front-end presentation.It adopts a syntax similar to Django template engine, easy to learn, and provides rich tags and conventions to standardize template creation.

Template files are organized in/templatedirectory, and support a clear folder organization mode (such asindex/index.html,{模型table}/detail.html)or flat file organization mode.config.jsonFiles are defined in a modular way for the basic information and types of templates. Moreover, templates supportinclude/extendsandmacroauxiliary tags.

  • includetagsAllow developers to split common elements such as headers, footers, sidebars, etc. into independent code snippets and reference them as needed.This avoids code repetition, improves development efficiency and maintenance convenience.
  • extendstagsImplemented template inheritance, developers can define a basic skeleton (such asbase.html), other page templates can extend on this basis, only rewriting the parts that need to be customized (viablockLabel)。This keeps the overall style and structure of the front-end page consistent, while also enabling local customization.
  • macrotagsthen provided a code snippet reuse mechanism similar to functions, especially suitable for rendering complex UI components repeatedly in loops.

These template mechanisms together constitute a highly modular front-end development environment.English developers can deeply customize the visual presentation and user experience of the website without affecting the core logic, and even develop completely independent visual themes for different sites.

Multi-site management: Modular implementation of independent operations

The multi-site management feature of AnQiCMS benefits directly from its modular design.Under the same AnQiCMS instance, multiple sites can be created and independently managed. Each site has its own configuration, database (optional), template, and content.

When carrying out secondary development on multiple sites, this modularization is reflected as:

  • Configuration independence: Each site can have its own system settings, contact information, TDK, etc., which can be easily managed through the back end without any code-level modifications.
  • Data Isolation and Sharing: Although the underlying database may be shared, each site's data logic is isolated to ensure that they do not interfere with each other. At the same time, when needed, template tags (such astagDetailofsiteIdParameter) also supports cross-site data calls, providing the possibility for multi-site linkage.
  • Template independence: Each site can be bound to different templates, even for different sites, you can customize specific template features, and all of this is built on a general template engine and modular conventions.
  • Resource independence: The website root directory can point to an independent new directory, which is used to store cache and other data for new sites, further isolating resource dependencies between different sites.

Through this way, secondary developers can design unique function modules and interfaces for each sub-site, achieving highly personalized multi-site operation. Whether it is a brand sub-site, regional portal, or content branch, it can respond flexibly.

Summary


Common Questions and Answers (FAQ)

Can I use different custom modules or plugins for my multiple sites? Can be.AnQiCMS's multi-site management feature is closely integrated with modular design.Although all sites share the same AnQiCMS instance, they are independent in configuration, templates, and data (configurable to be isolated or shared).This means you can enable or develop custom modules for specific sites, or even develop different custom modules for different sites.For example, a site may require a product review module, while another site may require an event registration module, all of which can be achieved through modular development and can run independently on each site.

extendsLabel inherits the official theme, or useincludeandmacroTo introduce a custom component, thereby ensuring that your custom part is not overwritten when the system is updated.For functional expansion, it is recommended to follow the **practice** of plug-in or module development and encapsulate custom logic in independent modules.AnQiCMS emphasizes that “each feature point can be independently upgraded and expanded”, which is to ensure that the results of secondary development are still effective in system iteration.