How do the new model features in AnQiCMS v2.1.1 affect the display logic of articles and products?

Calendar 👁️ 69

Since AnQiCMS was launched, it has been favored by users for its simple, efficient, and flexible features.In the latest v2.1.1 version, we welcome a major feature update - the brand new "model" feature.This seemingly technical improvement actually has a profound impact on the way we publish and display website content on a daily basis, especially for core content types such as articles and products.

Model Function: Blueprint of Content Structure

In simple terms, 'model' is likened to the blueprint or skeleton of content.In the past, we might have only fixed types such as "articles" and "products", whose fields (such as title, content, images, etc.) were preset.Now, with the model feature, we can flexibly define any type of content structure according to the actual needs of the website.

This means that, in addition to traditional articles and products, you can now easily create a "event" model to publish event information, or build a "case" model to showcase customer projects, or even a "team member" model to introduce your team.The update log of AnQiCMS v2.1.1 clearly states: "Articles and products are generated according to the model", which is no longer just a simple custom field, but allows each content type to have an independent, customizable underlying structure.

Content Creation: A More Intelligent Backend Experience

The model function has brought significant changes to the content creation level, making the backend editing experience more intelligent and closely aligned with actual business processes.When you enter the back end to prepare 'Add Document', you will first come across this change.

The key is the selection of the "category". The design concept of AnQiCMS is that each category is clearly bound to a specific content model.When you select a category, the system will immediately identify the model associated with that category and dynamically display all the fields defined by that model on the page.For example, if a category belongs to the "product model" you define, you may see fields such as "price", "inventory", "product specifications", "color options", and so on;And if it belongs to the "article model", it may be "article source", "author", "publishing media", and so on.

This dynamic loading mechanism greatly improves the accuracy and efficiency of content input.You no longer need to worry about irrelevant fields, each content editing interface becomes highly customized, only displaying the input items required for the current content type.This reduces the complexity of operations and ensures the structurization and consistency of data.

Front-end Display: Flexible Template Tag Application

The impact of model function on the front-end display logic is mainly reflected in the use of template tags.In the AnQiCMS v2.1.1 version, the template tags have been refactored, removing the originalarticle/productTags, Unified for More General UsearchiveLabel. This change means that, regardless of whether your content is a traditional article, product, or an activity, case, etc. that you create, it is uniformly allowed in the template.archiveList(Get list) andarchiveDetailInvoke the (Get detail) tag.

ThesearchiveLabels can not only obtain standard fields of content (such as title, description, thumbnail, etc.), but more importantly, they can flexibly display additional fields customized in your model. For example, if you add a field namedmaterial(Material) custom field, then in the product detail page template, you can directly call through{{archive.material}}to call and display this material information without any complex processing.

For those who are uncertain about the custom fields available, or want to dynamically traverse and display all custom parameters.archiveParamsLabels provide great convenience. It can output a certain content item in a looping manner (archiveAll custom field names and their corresponding values, allowing template developers to build content display blocks more flexibly.

In addition, when retrieving the content list,archiveListlabel'smoduleIdParameters are particularly important. You can specifymoduleId='1'to retrieve the content of all article models, ormoduleId='2'to retrieve the content of all product models, even your custom models.moduleIdTherefore, it can accurately control the display of different types of content. This allows a template page to be based onmoduleIdDifferent, dynamically loading and presenting data from different content models, thereby achieving highly customized and reusable content display.

Summary: Empower endless possibilities of content.

In summary, the model features of AnQiCMS v2.1.1, from content organization to frontend presentation, give users greater autonomy and creativity.It raises the core value of CMS - content management - to a new height, making website construction and operation more efficient, accurate, and flexible.Now, your website is no longer just a simple information publishing platform, but a flexible content hub that can carry infinite creativity and business possibilities.Whether it is for e-commerce websites to create unique parameter fields for different product categories or for content operators to efficiently manage and update various information, the model functions provide strong support, greatly simplifying complex content management tasks and unlocking more diverse ways of content display.


Frequently Asked Questions (FAQ)

Q1: After upgrading to v2.1.1, will the previously published articles and product content be affected? Do I need to edit them again?A1: AnQiCMS v2

Related articles

How to configure AnQiCMS Apache reverse proxy to correctly display website content?

AnQiCMS is an efficient content management system developed based on the Go language, which usually runs on a specific port of the server, such as the default port 8001.In order for users to access the website through common domain names instead of adding a port number at the end of the address, we need to configure a reverse proxy.

2025-11-07

How does the adaptive template, code adaptation, and PC + mobile mode affect the display of content on different devices?

AnQiCMS content management system provides powerful flexibility in content presentation, especially for display effects on different devices.It supports three template modes of "adaptive", "code adaptation", and "PC + independent mobile site", allowing us to finely control the display of content on computers, tablets, and mobile phones according to specific needs.Understanding the working principle of these patterns is crucial for ensuring user experience and optimizing website performance.First, let's understand **Adaptive Mode**.In adaptive mode, the website uses a set of templates and styles

2025-11-07

How does AnQiCMS handle template files with different encoding formats to avoid garbled content display?

One of the most annoying problems when using a website content management system is the display of garbled characters, especially when the website involves multiple languages or imports content from different sources.This chaos not only affects user experience, but may also damage the professional image of the website.AnQiCMS is a system dedicated to providing an efficient and customizable content management solution, with a clear strategy for handling template file encoding, aiming to help users eliminate乱码 from the root.The core lies in AnQiCMS's unified requirements for **UTF-8 encoding**. UTF-8

2025-11-07

How to control content conditional judgment and loop display in AnQiCMS with Django template engine syntax?

## How to cleverly use Django template syntax: Make AnQiCMS content display more flexible conditional judgment and loop The strength of AnQiCMS not only lies in its efficient and stable backend architecture, but also in the great flexibility it provides for content operators in front-end content display.Among them, deeply integrating the Django template engine syntax allows us to build like a child's blocks, easily control the presentation of website content through simple conditional judgments and loops, creating more intelligent and user-friendly dynamic pages.This article, let's delve into it together

2025-11-07

How does the AnQiCMS v2.0.1 version's new article content batch replacement and paraphrasing feature change the display of content?

## AnQiCMS v2.0.1: How do the content renewal, batch replacement and pseudo-original function change the website display?Today, in the increasingly fierce digital marketing, website content must not only be of high quality but also maintain freshness and flexibility.For content operators, how to efficiently manage and optimize a large amount of content while ensuring its good performance in search engines and in front of users is always a challenge.AnQiCMS v2.0.1 version brings the batch replacement and paraphrasing function of article content, which is designed to solve these pain points, and they are implemented in an intelligent way

2025-11-07

Template creation in progress, how do the public code (bash.html) and snippet directory (partial/) affect the page display?

In Anqi CMS, when we start building or modifying website templates, we come across some core files and directory structures, among which the public code file `bash.html` and the code snippet directory `partial/` play a crucial role in the final page display.They are not just a simple pile of template files, but also the 'skeleton' and 'building blocks' that make up the structure and display logic of the website, allowing our website to maintain consistency while having high flexibility and maintainability.

2025-11-07

How to configure specific template files for the homepage, detail page, list page, etc. of AnQiCMS to control the display?

AnQiCMS, with its high efficiency and flexible customization features developed in the Go language, provides strong control over the display of website content.Whether you are operating a small and medium-sized enterprise website, a personal blog, or need to manage multiple sites, understanding how to configure exclusive templates for different pages is the key to improving website personalization and user experience.In AnQiCMS, the core of content display lies in the template files.These files determine the visual layout, content formatting, and interactive elements of the website.AnQiCMS uses a syntax similar to Django template engine

2025-11-07

What is the impact of folder organization mode and flat file organization mode on template production and content display?

When building website templates in AnQi CMS, the organization of template files is one of the core issues you need to pay attention to.AnQi CMS provides two main template organization modes: **Folder Organization Mode** and **Flattened File Organization Mode**.These two modes have their own characteristics, and their choice will directly affect the efficiency of your template creation and the final presentation of the content.Understand their differences and impacts, which can help you make more informed decisions based on project needs.### Folder Organization Mode

2025-11-07