AnQiCMS is a system designed for efficient content management, one of its core advantages lies in its flexible content model, which allows the display of website content to be highly customized according to business needs and user experience.

To make full use of the AnQiCMS content model for flexible display, we can understand and operate from the following aspects.

first, Understand the essence and function of the content model.It is fundamental. In AnQiCMS, the content model is not just a term for predefined categories like "articles" or "products", it is more like a custom content skeleton.The system is built-in with 'Article Model' and 'Product Model' as general examples, but users can completely create new models according to their own business logic, such as 'Case Display', 'Team Members', 'News Release', 'Activity Registration', and so on.Each content model can define a set of exclusive fields, which can be single-line text, numbers, multi-line text, as well as single-choice, multi-choice, drop-down selections, and more types, and can be set to be required or have default values.This flexibility ensures that no matter how complex and diverse the content is, it can be stored and managed in the most structured way possible.For example, defining fields such as 'product price' and 'inventory quantity' for the 'product model', and defining fields such as 'publishing organization' and 'author' for the 'news release model', can make content management more refined.

secondly,The template system is a brush for displaying content models。AnQiCMS uses a syntax similar to the Django template engine, allowing us to display structured data of content models on the front-end. Template files are usually named with.htmlwith suffix, and organized in/templatedirectory. The system has a smart template matching mechanism, such as for the content of "product model", the system will prioritize searchingproduct/detail.htmlas a detail page template, searchingproduct/list.htmlAs a list page template.

But the real flexibility lies in.Customized template customization.Top. AnQiCMS supports specifying exclusive templates for specific content, categories, and even single pages.For example, if you want a product (ID 10) to have a unique display page, you can create a namedproduct/10.htmlThe template file. Similarly, if all products under a certain category (ID 10) require a special list layout, you can createproduct/list-10.html. When editing articles, categories, or single pages in the background, you can also manually specify a custom template file path in the "Document Template" or "Category Template" field (for exampledownload.htmlLet the content be presented with a completely different visual presentation. This multi-level template overlay mechanism allows developers and operators to tailor the display scheme for every corner of the website.In addition, AnQiCMS also supports creatingmobile/The directory to store mobile template, to achieve differentiated display of PC and mobile content, or to manage them uniformly through adaptive and code adaptation mode.

Moreover,Rich template tags are the conductors of content displayAnQiCMS provides a variety of built-in tags for extracting and displaying data from the content model.

  • archiveListandarchiveDetailTags are the core for listing and displaying documents (including articles, products, and custom model content). By these tags, we can flexibly according tomoduleId(Content Model ID),categoryId(Category ID),flag(Recommended attribute),order(Sorting method) as well aslimit(Display quantity) and other parameters, to accurately control the invocation of content. For example, on a product list page, we can usearchiveList archives with moduleId="2" categoryId="1" order="views desc" type="page" limit="10"to display the most viewed product under a certain category, and combinepaginationTagging implements pagination.
  • For the defined content modelCustom fieldwe canarchiveDetail with name="自定义字段名"Directly obtain its value, or also usearchiveParamsLabel to iterate over all custom fields, displaying in key-value pairs dynamically. This is particularly useful for building product parameter lists, event details, and other scenarios.
  • categoryListandcategoryDetailTags focus on displaying classification information, whether it is building multi-level navigation or displaying the description, images, and other information of the classification itself on the classification page, they are indispensable.
  • pageListandpageDetailIt is used to manage and display independent pages such as "About Us", "Contact Information", etc.
  • tagList/tagDetail/tagDataListIt allows us to aggregate and display relevant content based on the tag system, providing users with more dimensions of content discovery paths.
  • navListTags are used to build the navigation menu of a website, which can flexibly display first and second-level navigation links based on the navigation categories set in the background, and can even embed category or product lists in the navigation menu.
  • Furthermore,ifandforLogical control labels, as wellsafeUsed for safely outputting HTML content,renderAnd for rendering Markdown content to HTMLtruncatecharsFilters used to truncate long text and add ellipses, providing strong support for the dynamic logic and content embellishment of templates.

Through the above mechanism, AnQiCMS makes the flexible display of content easily accessible.Whether it is to build a complex product display website, a multi-dimensional content information platform, or an enterprise website that requires highly personalized services, AnQiCMS can provide powerful and flexible technical support.It is not just a content publishing tool, but also a tool to help operators maximize the value of content.


Frequently Asked Questions (FAQ)

  1. How to display content from different content models in different areas of a page?AnQiCMS supports calling different functions in the same template file,archiveListLabel, and specify differentmoduleIdandcategoryId