Content Model Double Identification: User-Oriented and System-Oriented
In the AnQi CMS, the design of the content model cleverly balances user-friendliness and system efficiency.The 'model name' and 'model table name' are the manifestations of this design concept.简单来说,一个是用于我们日常管理和识别的“友好名称”,另一个则是系统内部处理数据时依赖的“技术名称”。
Model Name: Clear and Intuitive Management Identification
The main function of the model name is to enhance the user experience of the backend management interface.When you publish new content or filter the content list, Anqi CMS will display different content types through the model name to help operation personnel quickly locate and operate.It will also appear in the breadcrumb navigation in the background, as the display name of the model level, allowing you to clearly know which type of content you are currently operating.Therefore, when naming a model, it is important to strive for descriptiveness, so that it can accurately reflect the content characteristics carried by the model, facilitating communication and collaboration among team members.
Model Table Name: Core Data Storage Key for the System
The difference in friendliness with the model name, "model table name" is a purely technical identifier, which is directly associated with a physical table in the database.This table is specifically used to store the data of all custom fields under the content model.In the internal operation of AnQin CMS, all data operations related to this model, such as content addition, deletion, modification, and query, field mapping, and data indexing, are all completed through this model table name.
The document explicitly states that the table name of the model must and can only bein English lowercase letters{module}The call should map correctly to the model.
Distinguishing between and collaborating: Understanding the importance of both
Adhere to these naming conventions, and you will be able to make more efficient and stable use of the powerful functions of the AnQi CMS, and build and maintain a high-quality website content system.
Common Questions and Answers (FAQ)
1. What are the consequences if I mistakenly fill in the 'table name of model' in Chinese or with uppercase letters when creating the content model?
According to the specifications and documentation of AnQi CMS, if the "model table name" does not strictly follow the rule of "English lowercase letters", the system will not be able to correctly identify and operate the corresponding database table.This is the most direct consequence that all content under this model may not be displayed normally. You may encounter data storage failure when publishing or editing content, and the front-end page may also fail to render content correctly.This could lead to abnormal website functionality, even the risk of data loss, so it is imperative to strictly follow this naming convention.
2. After the content model is created, can the 'model table name' be modified? What impact will the modification have on existing data?
It is not recommended to modify the 'model table name' after the content model is created and put into use.The 'model table name' directly corresponds to the physical table in the database, and any change will involve complex operations such as renaming the database table structure and data migration.This is highly likely to cause the loss of existing content data, or to cause internal data association errors in the system.Even though the system provides a modification entry, operations should be handled with caution, and a full data backup must be performed before making any modifications, as well as testing the impact on the production environment.通常,**实践是在模型设计初期就规划好正确的模型表名,避免后期更改。
3. "Model table name" and "URL alias" both need to be in English lowercase letters. Do they have any association?
Yes, there is a relationship between them. "URL alias" defines the identifier used in the pseudo-static URL for the content model (for example/article/ofarticle), it is defined through the pseudo-static rules.{module}Variable to call.The URL alias also requires the use of English lowercase letters due to the universal and compatible requirements of the URL, as well as the consistency of internal processing of the system.Although the 'model table name' is the internal identifier of the database and the 'URL alias' is the identifier for the external access path, both follow the English lowercase letter specification, which helps to maintain consistency between the internal system modules and the external URL structure, improving SEO friendliness and system maintainability.Reasonably naming them the same or similar English lowercase words can further enhance the consistency and understandability of the system.