What types of custom fields are supported in the AnQiCMS content model, and how do you add them?

Calendar 👁️ 66

In the operation practice of AnQi CMS, the flexible use of content models and custom fields is the key to improving website content management efficiency and achieving personalized display.As an experienced website operator familiar with AnQiCMS features, I will elaborately explain the types of custom fields supported in the content model and their addition methods, helping you fully tap into the potential of AnQiCMS.

AnQi CMS is dedicated to providing highly customizable content management solutions, among which 'flexible content model' is one of its core advantages.This means you can define the structure of different types of content according to the specific needs of your business, such as articles, products, events, etc., and not just be limited to predefined fields.By adding custom fields, you can add unique properties to each content type, thereby achieving more refined content management and richer frontend display.

Types of custom fields supported

The Anqi CMS content model supports various practical custom field types to meet the needs of entering different data formats. These types include:

Single-line text: This field type is suitable for inputting brief text content, such as the subtitle of an article, the brand name of a product, etc.The input length is usually limited to 250 characters, ensuring the conciseness and consistency of the data.

Numbers: When you need to enter pure numeric data, such as product prices, inventory quantities, and article reading counts (except for system-provided ones), you can choose the numeric type.The system ensures that the input content is only numbers, avoiding data format errors.

Multi-line text: For situations where longer descriptive text is needed, such as brief introductions of product details, detailed descriptions of event rules, etc., the multi-line text field provides ample space.It allows users to input multiline text content, supporting more complex text descriptions.

Single choice: When you want users to select one from a preset set of options, the single choice field is very suitable.For example, the "recommendation level" of an article can be chosen as Level A, Level B, or Level C, and the user can only select one.The value of the option must be entered line by line in the default value setting.

Multiple choice: If the content may contain multiple properties of the same type, the multiple choice field can meet your needs.For example, a product may have multiple features such as waterproof, dustproof, shockproof, and so on, and users can select multiple options.Similar to single selection, the options are also set through default values.

Dropdown selection: Similar to single selection, dropdown selection fields are also used to select one from multiple predefined options, but they are presented in the form of a dropdown menu, which saves more interface space.For example, select the product's 'color' or 'size'.The option is also set line by line in the default value.

These field types cover most of the common data entry scenarios in content management, greatly enhancing the adaptability and scalability of Anqi CMS.

How to configure custom fields

In AnQi CMS, each custom field configuration includes several key properties that together determine the behavior and display of the field:

Parameter name: This is the Chinese name used to identify the field in the background interface and front-end template, such as 'Article Author' or 'Product Source'.This name will be displayed directly to the backend staff to help them understand the purpose of the field.

The field name: This attribute specifies the English name used to store the field in the database, and it is also the unique identifier for data calls in the front-end template. It must be in English letters, for exampleauthororsourceTo ensure that the data can be written and read correctly.

Field type: As previously mentioned, you can select 'Single-line text', 'Number', 'Multi-line text', 'Single choice', 'Multiple choice', or 'Drop-down selection' as needed.Once the field type is determined, it will decide the form of data entry and validation rules.

Is required: This setting determines whether the field must be filled in when publishing or editing content.If set to required, the system will force-check whether the field has been entered when submitting the content, ensuring the completeness of key information.

Default value: You can set a default value for the field.For single-choice, multiple-choice, and drop-down selection fields, the default value area is used to enter all available options, each option takes up one line, and the system will automatically parse and present it as a selection item.If the field has a default value and you want to use the default value when calling from the front end, leave it blank when entering.

Detailed steps to add custom fields

The process of integrating custom fields into the Anqi CMS content model is intuitive and easy to operate:

The first step is to log in to your Anqi CMS backend management system. In the left navigation menu, you will find the 'Content Management' option, click to expand and select 'Content Model'.

After entering the content model page, you will see the system's built-in 'Article Model' and 'Product Model', as well as any custom models you may have already created.You can choose to modify an existing model to add fields, or click the "Add" button to create a new content model.

Select or create a model to enter the model editing interface.Here, you will see an area named "Content Model Custom Field".Click the 'Add Field' button within the area to pop up a form for configuring a new field.

In the new popup form, you need to fill in and select each of the fields mentioned earlier one by one.Enter the Chinese display name of the field in "Parameter Name", and the English identifier in "Field Call".Next, choose the appropriate "field type" based on the data type, and decide whether it is required according to business needs.If the field is a selection or dropdown type, please enter an option on each line in the 'Default Value' area.

After configuring all fields, click the 'OK' or 'Save' button at the bottom of the form to save the newly added field to the current content model.You can repeat this process to add more required custom fields to the model.

After the field is added and saved, when you create or edit a document belonging to the content model under "Content Management", the newly added custom field will automatically display in the "Other Parameters" collapse area of the content editing page.At that time, you can fill in the data of these custom fields for each document as needed.

By following these steps, you can effectively expand the content management capabilities of AnQiCMS, making your website's content structure more refined and meeting various operational needs.

Summary

The AnQi CMS content model and custom field functionality provides powerful flexibility and customization space for website operators.No matter whether you are managing articles, products, or any other type of content, you can ensure the standardization and diversity of display by precisely defining fields.Mastery in adding and configuring custom fields will greatly enhance your content creation and website management, thereby attracting and retaining users more effectively.


Frequently Asked Questions (FAQ)

How to call custom field data in front-end templates?

You can use the template tags provided by AnQiCMS to call the data of custom fields. For example, if you add a field namedauthorThe custom field, set as "Call Field", then you can use it in the article detail page template.{% archiveDetail with name="author" %}Enter the value of the field directly. If you want to display all custom fields in a loop, you can use{% archiveParams params %}tags to get and iterate through.

2. Can a custom field be set as required? What happens if it is set as required but the user does not fill it out?

Yes, when adding custom fields, you can check the 'Is Required' option.If a custom field is set as required and the user fails to provide the value of the field when publishing or editing content, the system will perform a check and prompt an error when the user tries to save, preventing the submission of the content until the required field is filled in completely.This helps ensure the integrity of critical data.

3. How are options set and managed for single-choice, multiple-choice, or dropdown custom fields?

These selection type custom fields have their options set in the 'Default Value' area of the field configuration.You need to enter each option on a separate line.For example, if your field is "product color", you can choose "red", "blue", "green", and you need to enter these three words respectively in the default value area, one word per line.The system will automatically parse your input and generate the corresponding options.

Related articles

How to perform batch keyword replacement operations for documents in AnQiCMS backend?

As a senior practitioner who is deeply engaged in CMS content operation for enterprise safety, I know how crucial it is to efficiently update and maintain content in daily website management.AnQi CMS is not only favored for its simple and efficient architecture, but also for its powerful feature set, becoming a powerful assistant for us to improve operational efficiency.Among them, the document batch keyword replacement function is particularly prominent, which can help us unify the correction of content, ensure the timeliness and accuracy of information, and greatly reduce the burden of manual editing.

2025-11-06

How to manage document categories in AnQiCMS and how to set custom fields for categories?

As a website operator who deeply understands the operation of AnQiCMS, I know the importance of content organization and personalized display for attracting and retaining users.In AnQiCMS, the management of document categories and the setting of custom fields are the core links to achieve this goal.A well-structured classification can help users quickly find the information they need, and flexible custom fields make content display more in-depth and diverse. ### Document Classification Management: Build a Clear Content Architecture In AnQiCMS, document classification is the foundation of website content organization.

2025-11-06

How to add documents and set recommended attributes, SEO titles, and scheduled publishing in AnQiCMS?

As a professional who deeply understands the operation of AnQiCMS, I know that efficient content publishing and fine SEO optimization are the key to the success of the website.AnQiCMS provides intuitive and powerful tools to help us easily manage website content.This article will provide a detailed explanation of how to add new documents in AnQiCMS, focusing on how to set recommended properties, SEO titles, and scheduled publishing features to ensure your content reaches the target audience accurately and achieves better search engine performance.

2025-11-06

How does AnQiCMS implement multi-level category nesting calls and document list display?

In the operation practice of AnQiCMS, flexible content organization and presentation is the key to attracting and retaining users.The nested call of multi-level classification and the dynamic display of document lists is the core embodiment of AnQiCMS giving operation personnel strong content management capabilities.By skillfully applying system template tags, we can not only build a clear website structure but also present content accurately according to the reader's needs.

2025-11-06

How to create, manage and call document tags in AnQiCMS

As a senior website operations manager for AnQi CMS, I am well aware of the importance of tags in content management and user experience.Labels can not only help us better organize content, improve the SEO performance of the website, but also guide users to discover more interesting information.I will give a detailed introduction on how to create, manage and call document tags in AnQiCMS to help you operate your website.

2025-11-06

How to upload and categorize images and videos in AnQiCMS page resource management?

As a long-term website operator deeply rooted in the AnQiCMS platform, I fully understand the importance of high-quality content and efficient management for the success of the website.In AnQiCMS, properly manage your image and video resources, not only can it make your content more colorful and rich, but also greatly improve the operation efficiency.Next, I will introduce to you in detail how to upload and categorize your images and videos in the page resource management module of AnQiCMS.

2025-11-06

How to create, edit, and set custom URLs and templates for AnQiCMS single-page management?

As an experienced website operator who deeply understands the operation of AnQiCMS, I fully understand the importance of efficient website content management, especially for single pages that carry the corporate image, service introduction, or contact information.The AnQi CMS provides intuitive and flexible tools for single-page management, allowing you to easily create, edit, and personalize the URLs and templates of these pages to meet the unique needs of your website.

2025-11-06

What features does the AnQiCMS backend global settings include, and how to customize parameters?

As a senior security CMS website operator, I know the importance of the background global settings.It is not only the 'brain' of the website, determining the overall performance and operational efficiency of the website, but also the foundation for us to achieve refined content management and optimization.With a proficient grasp and flexible application of these settings, we can ensure the stability and efficiency of the website and quickly adjust strategies based on market and user needs.This article will discuss in detail the core functions included in the Anqi CMS background global settings, as well as how to effectively customize parameters to meet the unique needs of our website.

2025-11-06