The Anqi CMS provides a powerful core capability in content management, which is its highly flexible content model.This feature allows us to freely define and organize various types of content according to the actual needs of the website, whether it is traditional articles and information, detailed product introductions, or time-sensitive event releases, all can be managed efficiently and orderly within the same system.It breaks free from the constraints of traditional CMS fixed content types, allowing us to focus more on the business logic itself rather than being limited by the system framework.
Deeply understand the core concept of the content model of AnQi CMS
To make full use of the advantages of Anqi CMS, it is first necessary to understand the concept of 'content model'.In simple terms, a content model is a set of exclusive data structures defined for a specific type of content.Imagine that each type of content has its unique properties: articles have titles, authors, and publication dates; products have names, prices, inventory, and images; events have themes, times, locations, and registration methods.The Anqi CMS content model allows us to create these 'property fields' for each content type, ensuring that all relevant information can be stored and managed structurally.
The system is built with the "Article Model" and "Product Model" as the foundation, which provides us with the convenience of quick access.But the place where it truly comes into its own is that we can completely modify these models according to our actual business needs, even create brand new custom content models.This flexibility is the key to the success of content operation, because it ensures that every inch of content on the website is accurately in line with our business logic.
Build diverse website content: from articles to events
The Anqi CMS content model concept allows us to easily meet various content display needs
For example, forArticle publishingWe can operate based on the built-in 'article model'.In addition to standard fields such as title, summary, detailed content, category, tags, and thumbnail, we can also add deeper metadata to articles by using 'other parameters', such as SEO titles for search engine optimization, standard links, or custom parameters required for specific articles (such as 'article source' or 'editor'), which can all be easily added in the background model management.
When it comes toProduct DisplayWhen, the built-in 'product model' comes into play.Product information is often more complex than articles, and may require fields such as price, inventory, and special fields.By content model, we can add custom attributes such as color, size, material, brand, SKU, and more to the product.What's even better is that AnQi CMS supports group image display, which means we can upload multiple images for products, fully showcasing the product details. This is crucial for e-commerce or display websites.These custom fields are directly associated with the product model, making the management of each product clear and orderly.
When encountering something likeEvent ReleaseWhen this kind of special content arises, if the built-in model does not meet the needs, we can create a brand new custom content model.Assuming we need to publish an online seminar activity, we may need the following fields: event name, registration deadline, event start time, event location (online meeting link), speaker, maximum number of participants, event poster image, registration form fields, etc.In Anqi CMS backend, we can enter the "Content Model" management interface, click "Add Custom Model", and then add these fields one by one.Each field can specify a type, such as 'Event Name' which can be a single-line text, 'Event Time' which can be a date and time type, 'Maximum Number of Participants' which can be a number, and the 'Registration Form Fields' can even be more complex form configurations.This detailed customization capability ensures the completeness and accuracy of activity information.
Association of content model with frontend display
Structuring content is just the first step, how to effectively organize and display these contents is equally important.
Of Security CMSClassification system
Tag systemIt provided another flexible way of content association.Tags do not differentiate between content models and categories and can associate across different types of content.For example, a "Spring Festival Sale" tag can be used to mark products as well as corresponding activities or promotional articles.This way, users can quickly find all related content.
Ultimately, all of this structured and classified content needs to pass throughFront-end templateDisplay to the visitor. The Anqi CMS template engine provides rich tags and functions, making it extremely simple to render backend data to the front end. For example,archiveListTags can be used to retrieve the content list under a specified model, category, or tag;archiveDetailUsed to display detailed information about the content;categoryDetailYou can obtain the details of the category. What is more impressive is that all the custom fields we define, can be accessed througharchiveDetailorarchiveParamsThe tags are flexible in templates, whether it is a single-line text, multi-line text, or even a group of images, they can be presented in the way we expect.This allows front-end developers to fully control the display effect of content, achieving highly customized website design.
Continuous improvement of content operation efficiency
The flexible content model of Anqi CMS not only provides powerful content structure construction capabilities, but also combines with multiple operational tools to further improve the efficiency of content management and distribution.From comprehensive SEO tools, to convenient content collection and batch import, to scheduled publishing functions, all of these provide solid technical support for small and medium-sized enterprises, self-media operators, and multi-site managers.By customizing the content model, the website can better adapt to market changes and user needs, achieving more accurate content marketing and optimized user experience.
The flexible content model of AnQi CMS is undoubtedly a powerful tool for building modern, diverse website content.It gives users great freedom, from the definition of content structure to the presentation of the front-end, it can be highly customized.Fully utilizing this feature will help us manage website content more efficiently and better serve business development.
Frequently Asked Questions (FAQ)
Ask: How can I display the list and detail page of a new content model on the front end?Answer: After you create a new content model, you need to design and upload the corresponding template file. Usually, the content list of the new model corresponds
{模型表名}/list.htmlto such a template (for example:activity/list.html),while the detail page corresponds{模型表名}/detail.htmlfor example:activity/detail.html)。In these templates, you can usearchiveListtags to get the content list of the model, and usearchiveDetailThe label to display detailed information of a single item, including all custom fields.Ask: What types of custom fields can be set in the content model? How do different types of fields call in the front-end?Answer: The content model of Anqi CMS supports various field types, including single-line text, numbers, multi-line text, single-choice, multi-choice, and drop-down choices. When calling from the front-end template, you can directly use
{% archiveDetail with name="你的调用字段名" %}Get the value of this field. For fields that contain multiple options such as multiple choice and dropdown selections, the value is usually returned in an array or a similar array structure, and you can use it in the template.forLoop to iterate and display all selected options.Can I specify a unique template for each page of the website (including category pages, single pages, and even individual documents)?