In today's rapidly changing digital world, the content carried by websites is no longer just simple articles and product introductions.From an exciting online event, a detailed customer case, to a professional team introduction and a complex service process, each type of content has its unique attributes and presentation methods.If your content management system (CMS) still only uses universal templates like 'article' or 'product' to publish all information, it will undoubtedly bring many limitations to content creation and display.
Traditional CMS often face a pain point: when you need to publish a new content type, such as "recruitment positionsThis is not only inconvenient to manage, but also requires a lot of customized development for the front-end display, and the data structure is chaotic, which is not conducive to future expansion and SEO optimization.
All this is easily resolved with the release of the new content model feature of AnQiCMS (AnQiCMS).It is no longer just about allowing you to add a few custom fields to existing "articles" or "products", but also gives you the ability to build new content types from scratch, completely according to business needs.This is like a tailor-made flexible 'content wizard' that makes your website content display more flexible than ever.
Why is the content model so important?
Imagine that your website not only publishes corporate news but also needs to display the following content:
- Company events:Each event has unique information such as "time of holding", "location", "registration method", and "number of participants limit".
- Customer case:Each case may include special fields such as 'Industry', 'Solution', 'Customer Feedback', 'Project Results Gallery', etc.
- Team members:Each member has structured data such as "position", "field of expertise", "personal introduction", and "avatar".
If all this content is crammed into the same 'article' model, then when publishing in the background, you will see a lot of fields that are irrelevant to the current content, which is easy to confuse; when displaying on the front end, you also cannot uniformly retrieve specific fields for beautiful layout or conditional filtering.The new content model is designed to address these pain points, giving each type of content its own 'ID card' and 'personal wardrobe'.
How does AnQi CMS build your exclusive content?
In the Anqi CMS backend, you will find a dedicated 'Content Model' management entry.Here, in addition to the system default built-in "article" and "product" models, you can freely create any new models you need.
For example, we want to create an "activity model":
- Define the basic information of the model:You can name it "activity", and set a concise "URL alias" (such as
eventThis determines the URL structure of future activity pages, making it more semantic and greatly beneficial for SEO.At the same time, the system will automatically generate the corresponding database table to ensure that the data is stored independently and does not interfere with each other. - Add a dedicated field:This is the core part. You can add a series of custom fields according to the actual needs of the event:
- Event name:Set to 'Single Line Text' type, required.
- Location of the event:Same as 'Single Line Text', allowing users to see the address at a glance.
- Start/End Time:Can be set to a 'number' or a more complex 'date time selector' type, ensuring that the time format is unified.
- Number of participants:Set to 'number' type for easy filtering or statistics.
- Registration link:Single line text type, pointing to the external registration page.
- Event poster:Set to "Image" or "Multiple images" type, supporting upload of multiple images to showcase the event.
- Activity Details:Set to 'Multi-line text' or rich text editor type, and provide a detailed description of the activity.
- Even adding fields such as 'event status' (in progress/ended), 'free or not', etc., greatly enriches the structure of the content.
Every field defined, you can set its "parameter name" (for display in the background, such as "event location"), and "field name" (for template development, such aslocationwhether it is a "mandatory item" and "default value".
Content publishing and flexible display
Once the "event model
On the front-end display level, Anqi CMS's template engine is closely integrated with the content model, providing unprecedented flexibility:
- Exclusive template auto-matching:You can design a list page and detail page template for the 'event model' separately (for example
event/list.htmlandevent/detail.html), the system will automatically apply it to ensure that each content type has the most suitable display layout. - Field invocation is intuitive and convenient:In the template, you can directly access through
{{archive.活动名称}}or{{archive.location}}In this way, you can accurately call each custom field's data, easily realizing customized layout and style. - Dynamic parameter filtering:If your 'event model' has set 'event status', 'free or not' and other selective fields, the front-end template can utilize
archiveFiltersLabel, automatically generates filtering conditions, allowing users to dynamically filter and view event information according to their needs, such as only displaying 'ongoing' 'free events'. - General field traversal:For scenarios where the specific field name is uncertain or when it is necessary to dynamically display all custom fields,
archiveParamsThe tag can traverse all additional parameters of the model, making your template design more universal and powerful.
This deep-seated flexibility allows you to no longer be limited by preset 'boxes', but to be able to adjust and expand the content structure according to the ever-changing nature of business.Whether it is to carry out refined content marketing, improve user experience, or optimize search engine rankings, the new content model will be a powerful boost for your website operations.
Summary
The new content model feature of AnQi CMS has brought content management from a 'fixed mode' to a 'customized era'.It allows you to freely define the structure and fields of content according to the real business needs, greatly enhancing the flexibility of content display.This means that your website can organize and present information more accurately, not only improving user experience but also laying a solid foundation for website SEO optimization and future business expansion.Your content is no longer bound by the framework, but has unlimited possibilities.
Frequently Asked Questions (FAQ)
1. What is the difference between the new content model and the previous "custom parameters"?The previous "custom parameter" was to add fields based on the existing "article" or "product" models, while the new content model allows you to start from scratch and create a completely new content type (such as "event", "recruitment"), which has its own independent database table, URL structure, and a completely custom set of fields.This provides a deeper level of structuring and flexibility, more suitable for content types with greater differences.
2. What adjustments need to be made to the front-end template after creating a new content model to display it?After creating a new model, you need to create the corresponding template file for the model in the template directory. For example, if you create a model named "activity", its table name iseventThen you need to createevent/list.html(List page template)andevent/detail.html(Detail page template).In these templates, you can utilizearchiveListandarchiveDetailTags, combined with the "call field" defined in the model to obtain and display content. Anqi CMS provides rich template tags for convenient flexible data retrieval.
What are the consequences if I accidentally delete a custom content model?Be sure to operate with caution!Deleting a custom content model is an irreversible operation.Once the model is deleted, all the contents under the model (including its corresponding categories, documents, and all data) will be permanently deleted from the database and cannot be recovered.Before performing the delete operation, the system usually has a clear warning prompt, suggesting that you carefully confirm and perform data backup.