AnQiCMS v2.1.1 version brings an anticipated new feature - "model".This update is not just about adding a few buttons; it fundamentally changes the way we organize and present website content, making the display logic of articles and products more flexible and powerful.For daily operators, this means we can manage and present various information more finely according to actual business needs, thereby enhancing user experience and the professionalism of the website.
The core of model function: Customizing 'skeleton' for content
To understand this new feature, we can view the content model as a 'blueprint' or 'skeleton' of content.Before AnQiCMS v2.1.1, when we published content, it was usually fixed 'article' or 'product' types, which had preset fields (such as title, content, thumbnail, etc.).The introduction of the 'model' function makes the structure of these contents no longer fixed, and we can create exclusive structures for different types of content as if we were building with blocks.
The system is pre-installed with the "Article Model" and "Product Model", which correspond to the commonly used fields when we publish articles and products.The more powerful part is, now we can customize new content models according to our own business needs.For example, if your website needs to publish "Recruitment Information", "Event Announcement", or "Customer Case", you can create an independent content model for each type and define unique fields for them, such as "Recruitment Information" can have fields like "Position Name", "Work Location", "Salary Range", and so on. "Event Announcement" can have fields like "Event Time", "Registration Method", etc.In the 'Content Model' management interface, we can add dedicated fields for each model, supporting single-line text, numbers, multi-line text, single-choice, multi-choice, and dropdown selection of various field types, and can set whether they are required and default values.This flexibility greatly enhances the system's adaptability to a variety of content management scenarios.
How does the model affect the publication and management of content?
The addition of model functions first changed the logic of content publishing and management on the back end.
When preparing to publish a new content, the operation process will become more intuitive and intelligent.When selecting the category, the system will automatically identify the content model bound to the category and dynamically display the fields unique to the model for us to fill in.For example, if you select a category belonging to 'Product Model', in the content editing page, in addition to the general title, content, etc., there will also be product-specific input boxes such as 'Price', 'Inventory', and 'Product Parameters'.If the category of "Article ModelThis means that different types of content will have exclusive filling interfaces that fully match their characteristics, avoiding unnecessary field interference and greatly improving the efficiency and accuracy of content entry.
Moreover, the document list has also become more refined in terms of content management.We can filter based on the content model, only viewing documents of specific models, such as managing all "products" or "events" information separately, making content organization and maintenance more orderly and clear.When deleting a model, the system will also remind that all documents and categories under the model will be deleted as well, ensuring data consistency.
The impact of model functions on the front-end content display logic.
The model function has also had a profound impact on the frontend display of content, making the development of website frontend templates and content display more flexible and refined.
In the past, we may have been accustomed to directly usingarticleorproductTags to obtain content, now all of these have been unified into a more generalarchiveUnder the tag system, and these tags can now intelligently recognize and process fields defined in different models.
The most significant change is, now we can go througharchiveDetailandarchiveListtags, as well as specializedarchiveParamsTags, easily access various custom fields defined in the model. For example, on the product detail page, if your product model defines fields such as "Size", "Material", etc., you can use them in the template.{% archiveDetail with name="尺寸" %}or by looparchiveParamsShow these unique product information.而在文章详情页,则可以调用“作者”或“来源”等字段,确保每种内容类型都能以最符合其逻辑和美观的方式呈现在用户面前。
This change is also reflected in the organization of template files. AnQiCMS supports setting independent template files for different content models. For example, we can create{模型table}/detail.htmlAs the detail page template for all content under this model,{模型table}/list.htmlAs its list page template.This means that the product detail page can have its own unique product images and parameter table layout, while the article detail page can focus on text reading and related article recommendations, without interfering with each other, achieving true customization display.{module}associating variables with the model to generate more semantically meaningful URLs.
the user value and operational impact it brings
The introduction of model functions undoubtedly brings great value to AnQiCMS users:
- Endless possibilities in content structure:No longer limited to "articles" and "products", you can create any content type that meets your business needs, such as cases, tutorials, announcements, Q&A, etc., making the website content more rich and diverse.
- Improve SEO effectiveness:The content structure and semantic fields are precise, which helps search engines better understand your website content and improve crawling and ranking effects.The customized model can also be configured with the best SEO information for different content types.
- Optimize user experience:Provide a more appropriate display format based on content type, reduce the time users spend obtaining information, and improve user satisfaction.
- Reduce maintenance costs:A unified backend management interface and flexible frontend adaptation mechanism, reducing the complexity of developing and maintaining independent modules for different content types.
- Promote the refinement of content operation:For different models, you can formulate more targeted operation strategies, whether it is in content creation direction, promotion channels, or data analysis, all of which can achieve more refined management.
In summary, the new model feature added in AnQiCMS v2.1.1 is an important step for the system in terms of flexibility and customizability.它赋能用户以业务逻辑为导向,自由构建和呈现多样化的网站内容,让每一次内容发布都充满目的性,每一次内容展示都更加贴合用户需求,从而为网站的长期发展注入新的活力。
Common Questions (FAQ)
How to create exclusive models for existing content types (such as news, cases) and apply them to existing categories?
How can I determine the current content belongs to which model in the template so that different display logic can be applied?When you go through
archiveDetailthe tag to get content details,{{archive.ModuleId}}or{{archive.Module.TableName}}Retrieve the model ID or model table name of the current content. Then, you can use{% if %}Logic judgment is used to apply different display logic or load different template fragments based on different model IDs or table names. For example, you can judge{% if archive.Module.TableName == "product" %}to display the unique layout of the product or{% if archive.Module.TableName == "article" %}Show article layout.If I customize a model, will it automatically have the default fields of articles or products (such as title, content, thumbnail)?Yes, AnQiCMS has considered universality in its design.No matter what content model you customize, it will automatically include some core common fields, such as title, content, thumbnail, description, keywords, etc., which are the basics of all types of content.You added a field in the "Content Model" called "Custom Field", which is a supplementary function beyond these common fields to meet the unique needs of a specific model.