How to use the flexible content model of Anqi CMS to display diverse content structures?

Calendar 👁️ 73

In this era where content is king, the content of websites is no longer limited to simple articles and news.From e-commerce products to event information, from customer cases to job positions, each type of content has its unique structure and display requirements.If a content management system (CMS) can only use a single 'article' template to carry all information, it will undoubtedly bring great difficulties to operation, not only low content management efficiency, but also the front-end display looks monotonous, difficult to attract users.

One of AnQiCMS's core advantages is that it provides flexible content model functionality, which completely solves the problem of diverse content structure.It is not just a content publishing tool, but also a platform that truly brings the structure of your website content to life.

The value of the content model: Say goodbye to the monotonous

Imagine if you run an e-commerce website, you need to display product images, prices, inventory, SKUs, and other information; if you are an event organizer, you need to post event dates, locations, registration links, organizers, and other details; or if you are a company, you need to post job information, including job titles, responsibilities, requirements, and salary ranges, etc.These far exceed the scope of traditional 'title + content' articles.

In AnQiCMS, the flexible content model means that you can create dedicated data structures for different types of content according to your business needs. This means:

  • Data structures are more preciseEach content type has its unique fields, ensuring that all key information can be systematically managed and displayed.
  • Content management is more efficient: When entering content on the back end, the form will dynamically adjust according to the content model you select, only displaying relevant fields, avoiding redundant information, and greatly enhancing operational efficiency.
  • More diverse front-end displayCombine template tags to present specific fields of different content in a more attractive and logical way to users, enhancing user experience and conversion rates.
  • SEO optimization more refinedThe structured data is easier to understand by search engines, and with the built-in SEO tools of AnQiCMS, it can effectively improve the search engine visibility of the website.

The core concept of AnQiCMS content model: Customization and flexibility

AnQiCMS system is default built-in with 'Article Model' and 'Product Model', which provides an out-of-the-box solution for most websites.However, its real strength lies in the fact that you can create an unlimited number of custom content models based on your unique business needs.This is like giving your content management infinite 'transformation ability,' able to easily handle any complex content structure.

The core of the content model is to define the "skeleton" of the content, that is, which fields it includes, what type each field is, and how it is managed and displayed.

How to create and apply diverse content structures in practice

To fully utilize the flexible content model of AnQiCMS, usually just a few simple steps are needed.

First step: Define your content model

First, we need to define a new content model in the background. For example, we want to create a 'event information' content model.

Log in to the AnQiCMS admin panel, go to the 'Content Management' menu, and select 'Content Model'.You will see the list of existing models.Here, you can click the 'Create Model' button.

In the interface for creating a new model, you need to fill in some basic information:

  • Model name: This is a Chinese name for easy identification by backend operators, such as "Event Information".
  • Model table nameThis is the table name stored in the database for content data, it is recommended to use meaningful lowercase letters, for exampleactivitiesThis name will also be used when calling the front-end template.
  • URL aliasThis name is used in the rule of pseudo-static, as part of the URL, and it is recommended to use lowercase English letters, such asevent. It will affect the link structure of your website's active pages, such as/event/123.html.
  • Title NameThis is the prompt text for the document title field when publishing content, for example, you can set it to 'Event Title' to make the content publisher clearer about what to fill in.

The core part is coming -Custom fields for content model. Here you can add exclusive fields for the 'Event Information' model:

  • Parameter Name: This is the field name displayed on the backend editing interface to the content publisher, such as 'Event Date', 'Event Location', 'Organizer', 'Ticket Price'.
  • Field invocationThis is the field name used by the template developer when calling data on the front-end, it must be alphabetic, for exampleevent_date/location/organizer/ticket_price.
  • Field type: AnQiCMS provides various field types to adapt to different data storage needs:
    • Single-line text: Suitable for short text information, such as 'Event Location', 'Organizer Name'.
    • Number: Suitable for numerical data such as 'ticket price', 'remaining quota'.
    • Multi-line text: Suitable for long descriptive texts that require detailed descriptions, such as 'event introduction', 'cautions'.
    • Single choice/Multiple choice/Dropdown choiceThese types are used to provide preset options, such as "Activity status (Ongoing, Completed)" and "Activity type (Online, Offline, Hybrid)".When setting, you just need to enter an option in the "default value" column, and the system will automatically parse it.
  • Mandatory?: You can set the field as required based on its importance to ensure the completeness of key information.
  • Default valueSet a default value for the field to improve the convenience of content publishing.

By such settings, we have created a content model for "event information" with specific fields such as "event title

Step 2: Content Publishing and Categorization

After the content model is defined, the next step is to allow content publishers to use it. AnQiCMS closely integrates the content model with 'Document Classification'.

You can create or edit a category under 'Content Management', such as the 'Latest Activities' category.In the category settings, you can select the 'document model' associated with this category. At this time, we choose the 'activity information' model we just created.

When the content publisher chooses to "publish documentIt is amazing that the document editing interface automatically loads all custom fields, such as 'Event Date', 'Event Location', etc., based on the 'Activity Information' model associated with this category.The publisher only needs to fill in the information according to the prompts, the entire process is intuitive and efficient.

Step 3: Front-end display: Display the data on the website

The content model makes backend management organized, while the powerful template engine and rich tags of AnQiCMS allow these structured data to be flexibly displayed on the website front-end.AnQiCMS supports Django template engine syntax, making template creation very easy to get started with.

To display the data of our 'Event Information' model, we can use the following tags:

  • archiveListTagUsed to retrieve the list of activities. You can specifymoduleIdTo retrieve the content of a specific model, for example: “`twig {% archiveList activities with moduleId=“your activity model ID” type=“page” limit=“10” %} {% for item in activities %}

    {{ item.Title }}

    The date of the event:{% archiveDetail eventDate with name=“event_date” id=item.Id %}{{ eventDate }}

    Event Location:{% archiveDetail

Related articles

How does Anqi CMS implement highly customized display of the website front-end page?

How to implement high-level custom display of the website front-end page in AnqiCMS? Want to create a unique and powerful website? The key is to have a flexible grasp of the front-end page.AnqiCMS fully understands this, it not only provides an efficient and stable background management, but also endows users with extremely high customization capabilities on the front end.This is due to its exquisite template design, flexible content organization, and rich tag system, allowing users to build and present websites according to their own imagination.### One, Flexible Template System

2025-11-09

How to use the `archiveFilters` tag to implement dynamic display of a multi-condition filter list?

How can we make it quick for users to find the information they need on the website, which is a key factor in improving user experience and conversion rate.When a website contains a variety of content, and each type of content has multiple attributes to choose from, providing a flexible multi-condition filtering function becomes particularly important.AnQiCMS provides a powerful `archiveFilters` tag that can help us easily implement dynamic filtering of content lists, making your website content come to life.Why do we need multi-condition filtering? Imagine that you are browsing a real estate website

2025-11-09

How to flexibly call and display custom fields in front-end templates?

When using AnQi CMS to manage website content, its powerful content model and custom field features provide great flexibility for the personalized needs of the website.At times, we not only need to publish regular article titles, content, etc., but also need to add some unique information for specific types of articles or products, such as the author of the article, product model, launch date, and special selling points.This information is implemented through the content model custom fields.How can I flexibly call and display these custom fields in a website front-end template?This is the issue we are going to delve into today.

2025-11-09

How to retrieve and display a list of related documents based on the current document to enhance content relevance?

How to keep visitors immersed in your site after they have finished reading an exciting article and discover more interesting information?One of the answers is to intelligently display relevant documents. This can effectively enhance user experience, extend the time users spend on the website, and for search engine optimization (SEO), it can also help spiders better crawl and understand the website structure through the construction of internal links, thereby improving the relevance of the content and the overall weight of the website.In Anqi CMS, it is not a complex thing to get and display the list of related documents

2025-11-09

How to configure and switch the multilingual content display on the Anqi CMS website?

Today, in an era of increasing globalization, it is an important step to enable your website content to be presented in multiple languages, to expand the market and serve users in different regions.AnQiCMS (AnQiCMS) is an efficient and flexible content management system that fully considers this need and provides a variety of solutions to help you easily configure and switch between multilingual content.Next, we will explore how to effectively manage and display multilingual content in Anqi CMS.### The multilingual concept of AnQi CMS: Distinction between system and content In AnQi CMS, multilingual support is mainly reflected in two levels

2025-11-09

How to optimize URL display and SEO through the pseudo-static feature of AnQi CMS?

In website operation, the structure of the URL (Uniform Resource Locator) not only affects user experience but is also a key element that cannot be ignored in Search Engine Optimization (SEO).A clear, meaningful URL address makes it easier for users to understand the page content, and also helps search engines better crawl and index the website, thereby improving the visibility and ranking of the website.AnQiCMS (AnQiCMS) understands this, and its pseudo-static feature has become a powerful tool for optimizing URL display and SEO. ### One, Static Simulation and SEO: Why Are They So Important?

2025-11-09

How to implement adaptive display of AnQi CMS content on different devices (PC, mobile)?

In today's parallel internet environment with multiple devices, ensuring that website content displays well on different screen sizes is crucial for improving user experience and website professionalism.AnQiCMS (AnQiCMS) fully considers this need, providing a variety of flexible strategies to help users easily achieve adaptive display of content on PC and mobile terminals.One of the core design philosophies of AnQi CMS is to support diverse content display, therefore it is built with three main website modes to meet the challenges of multi-device display: **Adaptive Mode**

2025-11-09

How to set up AnQi CMS article or product list according to specified conditions

When using AnQi CMS to manage website content, efficiently displaying articles or product lists is the key to improving user experience and website functionality.AnQi CMS provides flexible and powerful template tags, allowing us to accurately control the output of content based on various specified conditions.Whether it is to display the latest articles by category or to filter products by specific attributes, Anqi CMS can help us easily achieve this.### Flexible content handling: Document list tag `archiveList` The core content display capability of Anqi CMS mainly relies on `archiveList`

2025-11-09