As a website operator who deeply understands the operation of AnQiCMS, I am well aware of the importance of the content model in adapting to the structure and business needs of the website.The AnQi CMS excels in the flexibility of its content model, allowing us to deeply customize according to specific business scenarios, thereby efficiently managing and displaying a diverse range of content.
The core advantages of Anqi CMS content model
AnQi CMS places the core of content management above its flexible content model.The system is pre-installed with the "Article Model" and "Product Model", which provide general content structures for publishing blog articles, news information, or product information.However, this is just the beginning. Anqi CMS empowers us to customize, modify, and even extend these content models according to business characteristics, in order to accurately capture and present information of a specific type.This flexibility is the key to Anqi CMS adapting to the needs of small and medium-sized enterprises, self-media operators, and multi-site management.
Core custom options of the content model
Customizing the content model mainly involves adjusting the basic properties of the model itself and adding exclusive fields for it.
Firstly, we can adjust the basic attributes of the content model to better fit the business identification and website structure. This includes:
Model name: This is the Chinese name displayed in the background management interface and front-end breadcrumb navigation of the content model, which is convenient for operation personnel to identify and manage intuitively.Model table name: This is the name of the table where the content model data is stored in the database.To ensure the normal operation of the system and data consistency, the name must be written in English lowercase letters.URL alias: This alias must also be in lowercase English letters, it will be used in the pseudo-static URL rules of the website, through{module}Variables are represented in the link, which helps to build SEO-friendly URL structures.Title name: This option allows us to customize the prompt text for the title field when publishing content.For example, in a "product model", we can set the prompt to "product name" to make content editing more targeted.
Deep customization: Add exclusive fields to the content model
The most powerful custom ability of the content model is reflected in adding "custom fields for the content model".These fields allow us to transcend traditional titles and text, capturing specific structured data for different types of content.When adding a custom field, we need to define the following properties:
Parameter Name: This is the Chinese name displayed on the background editing interface of the field, such as "Article Author", "Product SKU", "Property Area", etc.
Field Name: This is the English name used to store the field in the database and call it in the template, such asauthor/sku/area。
Field type: Anqi CMS provides various field types to adapt to different data entry and display needs:
One-line text: Suitable for scenarios where a short line of text is needed, such as product model, brand name, or event slogan, the number of characters is usually limited to 250 within.Numbers: Designed for numeric data, such as product prices, inventory quantities, the number of bedrooms in real estate, or the number of participants in an event. Multi-line text: Used for inputting long descriptive text, such as product detailed feature introduction, real estate feature description, or event rule explanation.Single choice: Used when the user is expected to select one from a series of preset options, such as product color, size, or property status (for sale, sold).Options are set in the "Default" value, one per line.Multiple selection: Allows users to select multiple options from predefined choices, suitable for scenarios requiring multiple tags or attributes, such as product features (waterproof, dustproof, shockproof) or property facilities (with parking space, with garden).Options are also set in the "Default Value". Dropdown selection: Functionally similar to single selection, but presented in the form of a dropdown menu, suitable for scenarios with a large number of options, such as provinces, cities, or product materials.Is required: This setting is used to ensure the completeness of key information, the system will check it when the content is submitted. Default value: It can be used as a preset initial value for the field, or to define all the options in selection, multi-select, and drop-down types (one option per line).
How does the content model adapt to different business needs?
Through the above custom options, the content model of Anqi CMS can flexibly adapt to various business scenarios:
E-commerce website: Create a 'Product Model' and add custom fields such as 'Price', 'Stock', 'Brand', 'SKU', 'Product Material' (drop-down selection), 'Color' (multi-select) and 'Size' (single-select).This way, each product can store all necessary information in a structured manner.
Real estate information platform: Build a "real estate model" that includes "area", "house type" (single selection), "area" (numeric), "number of bedrooms" (numeric), "number of bathrooms" (numeric), "facilities" (multiple choices), and "property features" (multiline text) and other fields.This makes the property information clear and easy for users to filter and browse.
Event release website: You can define an 'event model' including 'event date', 'event time', 'event location', 'ticket price' (number), 'organizer', 'contact information', and 'event description' (multi-line text), and other fields.All details of each event can be accurately recorded and displayed.
News portal or industry blog:In addition to the built-in "article model", it can be further customized by adding fields such as "article source", "author biography", "reading time", or "whether it is a headline recommendation" (single selection) to enrich the article metadata, improve content quality, and enhance user experience.
Service-oriented corporate website: You can create a 'Service Project Model', add 'Service Duration', 'Price Range', 'Service Process' (multi-line text), 'Service Advantages' (multiple choices), and 'Case Pictures' (group photos, implemented through custom fields), etc.
In practice, when we select a specific category to publish content, Anqí CMS will dynamically display the corresponding custom fields in the content editing interface according to the content model of the category. These custom fields not only facilitate the content input on the backend, but also through template tags (such asarchiveDetailandarchiveParamsOn the website front end, it ensures accurate invocation and presentation, ensuring the structuralization and personalized display of content.This powerful flexibility makes Anqi CMS our powerful assistant for efficient website operation and coping with various content needs.
Frequently Asked Questions
Ask: What is the relationship between content models and document categories? Answer: In Anqi CMS, each document category must and can only belong to a specific content model.This means that when you create a new document category, you need to specify a content model (such as 'article model' or 'product model'), and once this association is established, it cannot be changed.This design ensures that all content under the category follows the same data structure, making it convenient for unified management and display.
How do I call custom fields from a content model on the front-end website?
Anqi CMS provides powerful template tags, such asarchiveDetailandarchiveParamsIt is used to call custom field data of the content model in the front-end template. Through{% archiveDetail with name="你的调用字段名" %}You can directly obtain the value of a single custom field, and{% archiveParams params %}You can traverse and display all custom field names and values, allowing you to flexibly display this information on the page according to your business needs.
Ask: What are the effects of deleting a content model? Answer: Deleting a content model is a cautious operation.Once the content model is deleted, all documents associated with the model and all categories under the model will be deleted as well.This means that all content data created based on this model will be permanently lost.Therefore, be sure to verify and confirm before performing the delete operation.