AnQiCMS, this content management system driven by Go language performs very well in content management, especially for its flexible content model function.As website operators, we often need to publish various types of content, such as detailed product introductions, professional technical articles, vivid case studies, and so on.Each content has its unique display requirements and information structure.Traditional content management systems may require cumbersome secondary development to meet these differences, but AnQiCMS's flexible content model was born to solve this pain point, allowing us to customize easily and present content more accurately and personally.

One, deeply understand the content model of AnQiCMS

In AnQiCMS, the 'Content Model' plays the role of the website's content skeleton, defining what information fields a certain type of content should include.The system provides the 'Article Model' and 'Product Model' by default, which covers most basic needs.But the strength of AnQiCMS lies in its ability to allow us to fully customize new content models according to our business needs.For example, if you want to display company project cases, you can create a "case model";If you operate a catering website, you can create a 'dish model' for the dishes.Each model can have its own unique information fields, which greatly ensures the structuralization and standardization of the content.

Two, customize exclusive fields: make content information more rich

The custom field function of AnQiCMS is the core of content personalization.When you enter the background "Content Management" module, find the "Content Model" to edit or add, you will see a region of "Content Model Custom Field".This is where we add more details and enrich the content.

1. How to add custom fieldsWhen adding fields, we need to define several key properties:

  • Parameter name:This is the Chinese name of the field, which is convenient for identification in the background management, such as "article author", "product model". It is also the reference name when called in the front-end template.
  • Call field:This is an English name, used for database storage and front-end template calls, such asauthor/product_model. The system will automatically convert it to camel case for use in templates.
  • Field type:AnQiCMS provides various field types to meet the needs of different information:
    • Single-line text:Suitable for brief text information, such as article source, product brand, author name, etc.
    • Number:Ensure that the input is numeric, such as product inventory quantity, price, and article reading volume, etc.