As an experienced CMS website operation personnel, I know that content structure is crucial for attracting and retaining users.The "Model" feature introduced in version 2.1.1 of AnQiCMS is a leap forward in our content management work.It liberates us from the traditional fixed content framework, giving the content structure unprecedented flexibility and customizability, thereby enabling more precise satisfaction of readers' diverse needs.

Aqj CMS v2.1.1 Model Function: The Foundation for Building Flexible Content Structures

In the daily operation of website management, we often encounter diverse content types and complex information structures.In the past, we may have needed to compromise or adapt to the existing content publishing model.However, one of the core updates in the AnQiCMS v2.1.1 version, the "Model" feature, has completely changed the situation.It allows us to create dedicated structured blueprints for different types of content, thus achieving truly personalized content display and efficient management.This feature not only enhances the adaptability of the system, but also directly contributes to our production of higher quality, more user-friendly content.

Understanding the core value of the content model

The content model, as the name implies, is a set of rules for defining the structure of a specific content type.It can be considered as the 'skeleton' or 'data template' for each category of content on your website.For example, a common 'article' model may include fields such as title, content, publication date, etc.And a "product" model may need more specific fields such as product name, price, inventory, multiple images, and so on.By customizing the content model, you can create an infinite variety of content types, such as "event list", "team member introduction", "service project details", etc., to ensure that each piece of content is presented in the most appropriate and complete manner possible.This meticulous structural management not only standardizes the content creation process, but also provides a solid foundation for front-end display and SEO optimization.

Access and Manage Content Models

To start using this feature, you need to log in to the AnQiCMS backend management interface.In the left navigation menu, find the "Content Management" module, click to enter, and you will see the option "Content Model".Enter the content model management page, where you will see the system's default built-in 'article model' and 'product model'.These built-in models can be modified according to your actual needs, but cannot be deleted.You have full editing and deletion permissions for the models you create customly.

It needs to be emphasized here that deleting a content model isIrreversiblethe operation and willpermanently delete all documents under the model and the document categories associated with themTherefore, please make sure to confirm and back up the data before performing a delete operation to avoid unnecessary data loss.

Create and define a new content model

Creating a new content model is the first step in customizing the content structure. The process is intuitive and powerful. After clicking the "Add Model" button, you will enter the model definition interface and need to fill in the following key information:

  • Model name:This is a user-friendly display name, which will be displayed in the background management interface and may also appear as a level name in the front-end breadcrumb navigation.
  • Model table name:This is a crucial field, which determines the storage table name of your custom field content in the database.Please make sure to use lowercase letters.If other characters are entered, it may cause the content to be displayed incorrectly and even trigger system errors.
  • URL alias:This field is alsoOnly lowercase English letters are supportedIt is used to call the model in the pseudo-static rule, which directly affects the URL structure of your website, making it more concise and SEO-friendly.
  • Title Name:This setting will change the placeholder text for the content title input box when you publish the model content.For example, if your model is 'product', you can set this to 'product name' to guide content creators.

Add custom fields to the model

The custom field is the core highlight of the content model feature, making your content structure truly unique.You can add any number of custom fields based on the specific needs of different content types.For example, the activity model may require fields such as 'activity date', 'activity location', 'registration link', etc.When adding a custom field, you need to configure the following properties:

  • Parameter name:This is the display name of the field in the background editing interface, for example, "Article Author", "Product Number".
  • Call field:This is the name used to reference this field in the template, as well as the actual field name in the database.Please use letters.For exampleauthororproduct_sku.
  • Field type:AnQiCMS provides various field types to adapt to different data formats, including:
    • Single-line text:Suitable for short text input, such as author name.
    • Number:Only allows input of numbers, such as prices, inventory.
    • Multi-line text:Suitable for long text input, such as detailed description.
    • Single selection (Radio):Allow selection of one from preset options.
    • Multiple selection (Checkbox):Allow selection of multiple from preset options.
    • Select (Select):Provide a dropdown menu for user selection.
  • Mandatory?:Mark whether this field is a mandatory item for content publication.
  • Default:Provide a default value for the field. For single choice, multiple choice, and dropdown types, you need to enter each option here,one per linethe system will automatically parse.

Use the content model to create and organize content

After you define the custom content model, its role will be reflected in the entire process of content creation and management.On the "Add Document" page, a key step is to select the "category".In AnQiCMS, each category must be associated with a specific content model.Once you have selected the category associated with your custom model, the system will immediately load and display all the custom fields you have defined for that model in the 'Other Parameters' collapse box.This means that content creators will accurately fill in the required information based on the selected content model, thereby ensuring the structurization and consistency of each piece of content.

This model is closely related to classification and determines the front end