AnQiCMS has been favored by a wide range of users since its launch, thanks to its concise, efficient, and flexible features.In the latest v2.1.1 version, we are delighted to introduce 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 in our daily lives, especially for core content types such as articles and products.
Model Function: Blueprint of Content Structure
In simple terms, 'model' is like the blueprint or framework of content.In the past, we may have only fixed 'article' and 'product' types, with their fields (such as title, content, images, etc.) preset.Now, with the model feature, we can flexibly define any type of content structure based on the actual needs of the website.
Content Creation: Smarter Backend Experience
The model function brings significant changes to the content creation level, making the backend editing experience more intelligent and in line with actual business processes.When you enter the background to prepare 'Add Document', you will first encounter this change.
The key here is the selection of the "category".AnQiCMS's design philosophy is that each category is explicitly 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 the model on the page.For example, if a category belongs to the "product model
Front-end Display: Flexible Template Tag Application
The impact of model features on the front-end display logic is mainly reflected in the use of template tags.article/productTags, unified for more generalityarchiveLabel. This change means that, regardless of whether your content is traditional in the sense of articles, products, or activities, cases, etc. that you create yourself, they are all unified through the template.archiveListGet list andarchiveDetailCall with 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 the additional fields you customize in the model. For example, if you add a field namedmaterialThe custom field of (material), then you can directly call and display this material information in the product detail page template without any additional complex processing.{{archive.material}}to call and display this material information, without any additional complex processing.
For those who are unsure about which custom fields are available, or for scenarios where dynamic traversal and display of all custom parameters are desired,archiveParamsLabels provide great convenience. It can output a certain content item in a loop.archiveThe names of all custom fields and their corresponding values below, allowing template developers to build content display blocks in a more flexible manner.
In addition, when retrieving the content list,archiveListTagsmoduleIdThe parameter becomes particularly important. You can specifymoduleId='1'to get the content of all article models, ormoduleId='2'to get the content of all product models, even your custom models.moduleIdThus, it can accurately control the display of different types of content. This allows a template page to adjust according tomoduleIdThe difference lies in dynamically loading and presenting data from different content models, thus achieving highly customized and reusable content display.
Summary: Empowering endless possibilities for content.
Common Questions (FAQ)
Q1: I upgraded to v2.1.1, will the previously published articles and product content be affected? Do I need to edit them again?A1: AnQiCMS v2