How AnQiCMS supports custom content models to implement

Calendar 👁️ 60

In the process of building and operating a website, we often encounter such challenges: the standard article or product templates provided by the content management system (CMS) often fail to fully meet the unique needs of our business.AnQiCMS (AnQiCMS) is well aware of this pain point, and therefore, from the very beginning of its design, it has made "flexible content model" one of its core highlights, aiming to help users break free from the constraints of traditional CMS and achieve true personalized content management.

Break traditional boundaries, define your exclusive content structure

Imagine that you are running a real estate information website, where you need to post rental or sale information.It is obviously not enough to describe a property only with the 'article title' and 'article content'.You will need a series of specific fields such as 'type of apartment', 'area', 'rental/sale price', 'location', 'facilities', and so on.Or maybe you are managing a platform for event publications, then information such as 'event name', 'time', 'location', 'guests', 'deadline for registration' is indispensable.

The self-customized content model feature of Anqi CMS is exactly for solving these scenarios.It allows you to build a dedicated content structure according to your actual business needs, just like building with blocks.This means that your website is no longer limited to preset "article" or "product" frameworks, but can define a set of data models that best fit any type of business content.

How to build a custom content model in Anqi CMS

The AnQi CMS integrates the management of content models in the "Content ManagementThe system provides the "article model" and the "product model" as a starting point, but this is just the beginning.

  1. Create or modify the basic information of the model:When you decide to create a new content model, you will first set some basic properties.For example, 'Model name' is the Chinese label displayed in the background and foreground of the content model, such as 'Real estate information' or 'Event details'.The 'model table name' is an English lowercase identifier used for database storage, the system will create a corresponding database table for your new content type based on it, it is recommended to choose a concise and meaningful English word.In addition, the "URL alias" will affect the display format of this type of content in the front-end URL, and the "title name" can customize the prompt language of the main title during content editing, making the back-end operation more intuitive.

  2. The core is located: Flexible definition of custom fields:The most powerful place of the custom content model is that you can add any number and type of custom fields. Click "Custom fields of content model", and you can add various practical properties to your model:

    • Parameter name and calling field:“Parameter name” is the Chinese display name of this field on the back-end interface, for example, “House type”, “Event date”.And the 'call field' is the English identifier you use in the front-end template to retrieve the data of this field. It is recommended to keep it concise and standardized.
    • Diverse field types:AnQi CMS provides a variety of field types to meet the storage needs of different data:
      • Single-line text:Suitable for short text input, such as "floor","phone number".
      • Number:Ensure that the input data is purely numeric, such as "house area","maximum number of participants".
      • Multi-line text:Suitable for entering long descriptive content, such as 'property highlights', 'event introductions'.
      • Single choice, multiple choice, dropdown choice:These three types are very suitable for preset options, allowing users to choose from a list.For example, the 'renovation status' (finished, unfinished) of real estate, the 'charging method' (free, paid) of activities, or the selection of regions, etc.When setting these fields, you can directly enter each option in the "default value" line by line, and the system will automatically parse it.
    • Required items and default values:You can set certain key fields as 'required' according to your business needs to ensure data integrity.At the same time, setting a 'default value' for the field can provide convenience when creating content, reducing repeated input.
  3. Content binding with the model:In Anqi CMS, the binding of content and models is realized through "document categories".When you create a new category, the system will require you to select the "document model" to which the category belongs.Once a model is selected, all content in this category will strictly follow the field structure of the model.For example, you have created a 'Apartment Rental' category and bound it to the 'Real Estate Information' model, so all content published under the 'Apartment Rental' category will display the housing fields such as 'Layout', 'Area', etc. that you define for filling in.

  4. Content publishing experience:Once the content model and category settings are completed, when you add a document in the background, after selecting the corresponding category, Anqi CMS will automatically identify and dynamically load all the custom fields of the model, display them in the content editing interface, making content entry clear and organized.

Display custom content on the website front end

After defining the content model, how to elegantly display these personalized data on the website is another highlight of Anqi CMS.The AnQi CMS template engine (similar to Django template syntax) makes everything very intuitive.

  • Get a single custom field:You can directly go through the article or product detail page template in your{{archive.您的自定义调用字段}}The form of to obtain and display the data of a specific field. For example, if you define a field called 'house type', its calling field ishouseType, then in the template, you can display it like this:<div>户型:{{archive.houseType}}</div>.

  • Traverse all custom fields:If a content model has multiple custom fields and you want to display them in a unified area, you can usearchiveParamsThe label can obtain all custom fields in the model in a list form and traverse them in a loop, which is very suitable for displaying in areas such as product parameters and real estate details.forLoop through and display them, very suitable for displaying in areas such as product parameters and real estate details.

  • Implement advanced filtering and search:AnQi CMS not only supports displaying custom fields, but more importantly, it allows you to build powerful front-end filtering functions based on these fields. ByarchiveFiltersLabel, you can convert custom fields into interactive filtering conditions, for example, users can filter real estate listings based on conditions such as "price range", "house type", etc. CombinearchiveListTags can easily realize complex data queries and displays.

Through these flexible mechanisms, Anqi CMS returns the initiative of content management to the user, whether it is the design of content structure, the back-end input experience, or the front-end display and interaction, all of which can be highly customized to better serve your business goals.


Frequently Asked Questions (FAQ)

Q1: How to display these new fields in my website front-end template after customizing the content model?A1: The AnQi CMS template engine provides two main methods. First, you can directly use{{archive.您的自定义调用字段}}to retrieve and display specific field data, where您的自定义调用字段Is the English call field set when you define the model in the background. In addition, if you want to display or iterate over all custom fields uniformly, you can use{% archiveParams params %}Label, it will return an array containing all custom field names and values, you can iterate throughforto display one by one.

Q2: If my business requirements change, can I modify or delete existing content models and custom fields?A2: Yes, Anqi CMS supports modifying and deleting content models and custom fields.On the "Content Management" -> "Content Model" page, you can edit the model name, URL alias and other basic information, and add, delete or modify custom fields.But it should be noted that deleting the content model is a very cautious operation, as it will also delete all the bound categories and content data under the model. Please be sure to back up the data and confirm carefully before performing the operation.The modification of field type may also affect the compatibility of existing data.

Q3: Does the custom content model support multilingual?A3: AnQi CMS itself supports

Related articles

How to loop and display the titles (ContentTitles) of AnQi CMS documentation in the front-end template?

Dynamically display document content title: The Loop and Application of ContentTitles in AnQiCMS front-end template When operating website content with AnQiCMS, we often need to provide users with a better reading experience and navigation convenience. One very practical feature is to automatically generate the article table of contents (Table of Contents).AnQiCMS considers this very carefully, it can automatically extract the titles from the document content and provide them to the front-end template in the form of `ContentTitles`. Today

2025-11-07

How to set contact information in AnQiCMS and display it on the front page (such as phone number, address, WeChat)?

In today's digital age, a website's contact information is not only for displaying information but also a bridge for communication between the enterprise and the customer.Clear and easily accessible contact information can effectively enhance customer trust and promote business conversion.AnQiCMS (AnQi Content Management System) knows this well and provides a simple and efficient way to set up and display various contact methods, whether it's phone, address, or WeChat. Let's take a step-by-step look at how to configure and display this key information in AnQiCMS.### First step: Set your contact information in the background First

2025-11-07

How to manage website navigation links and display them on the front page in AnQiCMS?

When building and managing a website, a clear and intuitive navigation system is the foundation of user experience and search engine optimization.AnQiCMS provides a flexible and powerful navigation management mechanism, allowing you to easily organize the website structure and elegantly present it to users. ### One, Back-end Navigation Management: Build the Skeleton of Your Website The navigation management feature of AnQiCMS is located in the "Back-end Settings" menu. Click on "Navigation Settings" to enter.Here, you can build a clear navigation system for the website like stacking blocks.

2025-11-07

How to display the language switch options and hreflang tags on a multilingual site in AnQiCMS?

Building multilingual websites in AnQiCMS and providing convenient language switch options as well as correct hreflang tags is a key step in expanding the international market and improving user experience.AnQiCMS with its flexible architecture provides a clear path to achieve this goal, allowing your website content to accurately reach global users while ensuring search engine friendliness. ### Overview of AnQiCMS Multilingual Implementation AnQiCMS integrates multilingual support with multi-site management functions in its design.This means, each different language version

2025-11-07

How does AnQiCMS achieve diverse content structure display through the content model?

In today's rapidly changing digital world, the richness and diversity of website content are key to attracting and retaining users.AnQiCMS provides a powerful function in content management, namely **content model**, which allows the website to easily build and display various structured content, meeting users' needs for content presentation.What is the content model of AnQiCMS?One of the core strengths of AnQiCMS is its flexible content model design.In simple terms, the content model is the 'blueprint' or 'skeleton' of your website's content

2025-11-07

How to configure AnQiCMS to achieve seamless switching and display of multilingual content?

Today, with the deepening of globalization, website support for multiple languages is no longer an optional choice, but a key factor for enterprises to expand into international markets and serve diverse user groups.It is crucial to have the ability to seamlessly switch and display multilingual content, whether it is to attract overseas customers or enhance the brand's international influence.AnQiCMS is fully aware of this need, providing an efficient and practical solution for seamless switching and display of multilingual content through its powerful multi-site management features and flexible template mechanism.Here, we will discuss how to configure AnQiCMS

2025-11-07

What specific optimization effect does the static rules of the website have on the display of AnQiCMS page URLs?

In website operation, the page URL (Uniform Resource Locator) often plays a more important role than we imagine.It is not only the entrance for users to access the website, but also the key clue for search engines to understand and collect website content.For a content management system like AnQiCMS, how to effectively optimize the URL structure is directly related to the visibility and user experience of the website.The application of pseudo-static rules is a core optimization strategy.What is the rule of pseudo-static?Why is it so important in AnQiCMS?

2025-11-07

How can AnQiCMS use SEO tools to improve the visibility of content in search engine results?

In the vast realm of digital marketing today, content creation is indeed important, but how to make these carefully crafted contents discovered by the target audience is the key to realizing their value.Search engine optimization (SEO) is the bridge connecting content to readers, and AnQiCMS, as an enterprise-level content management system, is well-versed in this, built-in with many powerful tools, aimed at helping users improve the visibility of their content in search engine results. We will delve deeper into how AnQiCMS can gain more exposure for your website content through its unique features.###

2025-11-07