What do the two states represent for the `status` field in `config.`?

Calendar 👁️ 58

In the template management system of AnQiCMS (AnQiCMS),config.jsonThe file plays a vital role, acting like an 'ID card' of a template, recording various basic information and current status of the template. Among them,statusThe field is a key identifier used by the system to recognize if the template is activated for use.This field has only two possible values, each representing different meanings and uses, which are crucial for the normal operation of the website and the flexible management of templates.

Status 1:status: 0(Disabled)

Whenconfig.jsonin the filestatusthe field is set to0When, this indicates that the current template is in an "disabled" state. This means that the template already exists in the AnqiCMS system, but it is not the active template currently displayed on the website.In the operation of actual websites, this status template usually has many uses.For example, a website operator may be developing a completely new template or making a major overhaul of an existing template, these templates in the development or testing phase will remainstatus: 0To avoid affecting the normal access of the current online website. At the same time, some backup templates, seasonal templates, or simply templates installed as backups in the system will also be set to the disabled status.This allows website administrators to plan, modify, and prepare the website appearance without affecting user experience.

Status 2:status: 1(In use)

On the contrary, ifconfig.jsonin the filestatusthe field is set to1This template is currently in use. It is the active, publicly accessible template of the website. When a user visits the website, the Anqi CMS system will use this template according to thestatus: 1An identifier is used to load and render the content and layout of the corresponding template. In the design of AnQi CMS, a core principle is to ensure the uniqueness and stability of the website, therefore, the system strictly stipulates,In all templates, only one template set can be usedstatusThe value is set to1This restriction ensures that the website always has a consistent appearance and behavior, avoiding display errors or functional anomalies caused by conflicts between multiple templates.Website operators can easily switch the website from one template to another by toggling this state, enabling quick style updates or emergency template rollbacks.

In short,statusThe field is the core of the Anqi CMS template management mechanism, it is simple to use0and1Two values clearly distinguish between the active and inactive status of the template, thereby providing flexible and secure template deployment and switching capabilities.


Frequently Asked Questions (FAQ)

1. How can I change or activate a new template in the AnQiCMS backend?

In the AnQiCMS admin backend, there is usually a menu item related to "Template Design" or "System Settings".After entering this page, you can browse the list of installed templates.The system will clearly display the current status of each template. To activate a new template, simply select the target template and click the corresponding "Enable" or "Set as Default" button.The system will automatically change the status of the currently used template to0(Disabled), and change the status of the new template you have selected to1(In use).

2. If I mistakenly set multiple template'sstatusfields to1What will happen?

The Anqi CMS system follows the principle of "only one set of templates" in its design. If thestatusvalue is set to 1. Ifconfig.jsonManually modified in the file and caused multiple templatesstatusfields to1The system may exhibit unpredictable behavior, such as default loading of one template, error messages, or confusion in some pages. To avoid this, please always perform template switching operations through the backend interface, and the system will handle it automatically.statusThe correct setting of the field. If this situation occurs, it is recommended to immediately change the status of all templates except the target template through the background0.

3. Why do templates needconfig.jsona file to define their status?

config.jsonFile as the metadata carrier of the template, definesstatusThe field has several main reasons: First, it provides the system with a quick, unified way to identify which template is currently active and which is standby.Secondly, this file-based configuration method is convenient for developers and operators to directly manage and version control templates, especially in environments with multiple sites or continuous integration/deployment.Finally, it enhances the flexibility of template management, allowing the configuration and switching of the presentation logic of the website without touching the core code.

Related articles

How to configure the display mode of the `template_type` field in `config.`?

As an experienced CMS website operation personnel, I am well aware of the importance of template configuration for website presentation and user experience.Today, let's delve into the `template_type` field in the `config.` file, which finely controls the display mode of your website template.In AnQi CMS, each template package core includes a configuration file named `config.`.This file is the 'identity certificate' of the template, which defines the name, version, author, and other basic information of the template. Among them

2025-11-06

When creating a new template, what are the required and optional fields in the `config.` file?

In Anqi CMS, creating a new website template is a key step to achieving personalized content display.The core of each template includes a `config.` configuration file, which is like the template's 'ID card', declaring the basic information, functional characteristics, and management status to the system.Familiarize yourself with the structure and field functions of the `config.` file, which is crucial for website operators and template developers, as it ensures that the template is correctly identified, managed, and applied by the system.

2025-11-06

Where is the root directory of AnQiCMS template located?

As a senior security CMS website operator, I fully understand the core position of templates in website construction and content presentation.The template not only determines the visual style of the website, but also directly affects user experience and the efficiency of content delivery.Accurately understand the storage location of the template file is the basis for carrying out any website customization and optimization work. ### The Root Directory Location of AnqiCMS Templates In the architecture design of AnqiCMS, all the core files of the website templates are stored in a clear root directory.

2025-11-06

How to set up an independent directory structure for the mobile template of AnQiCMS?

As a website operator who is deeply familiar with the operation of AnQiCMS, I know that a flexible and efficient template management mechanism is important for the website, especially in the mobile-first era, providing an independent optimized template experience for mobile devices is the key to attracting and retaining users.AnQiCMS provides powerful support in template design, including setting up a separate directory structure for mobile templates, which allows us to provide customized content display and interactive experience for different devices.

2025-11-06

How does the AnQiCMS template organize common code (such as header and footer)?

As an experienced CMS website operation personnel of an enterprise, I know that efficient content management cannot do without a well-organized and easy-to-maintain template system.In AnQi CMS, to better manage the public code of the website, such as the header (Header) and footer (Footer), the system provides a clear template organization structure and powerful template engine features.This not only improves the development efficiency, but also ensures the consistency and maintainability of website content.

2025-11-06

How to create and reference reusable code snippets (such as sidebars) in AnQiCMS templates?

As an experienced CMS website operation personnel of a security company, I know that efficiency and maintainability are the key to website content management in daily work.AnQiCMS provides a powerful and flexible template system, where creating and referencing reusable code snippets is an important means to improve these aspects of efficiency.This not only reduces repetitive labor, but also ensures the consistency of the overall style and function of the website, and also lays a solid foundation for future content updates and website renovations.

2025-11-06

What is the naming convention for the default homepage template file in AnQiCMS?

As an experienced CMS website operation personnel of an enterprise, I know that the naming specification of template files is crucial for the smooth operation and efficient management of the website.A clear naming convention not only ensures that the system renders the page correctly, but also greatly improves team collaboration and post-maintenance efficiency.Below, I will elaborate on the naming rules of the default home page template files in Anqi CMS.In AnQi CMS, all template files are stored in the `/template` folder under the system root directory.Each independent website template will be in `/template`

2025-11-06

How to create default templates for the model home page, document detail page, and list page of AnQiCMS?

As an experienced security CMS website operator, I am well aware of the importance of a clear and efficient template system for website content management.AnQiCMS provides a highly flexible and customizable template system that allows us to easily create personalized page layouts based on different business needs.Mastering the creation method of its default template is the foundation for efficient operation and content optimization.This article will detail how to create default templates for the model homepage, document detail page, and list page of AnQiCMS, with instructions on the use of key tags

2025-11-06