How do custom fields of the content model (such as radio, checkbox, text) display on the front-end page?

Calendar 👁️ 66

AnQi CMS: Let the custom content model fields shine on the front end

When using AnQi CMS to manage website content, we often encounter the need: the standard content structure can no longer fully meet the display of specific information.For example, on a product page, in addition to the title and content, we may also need to display its "color options", "size range", or "stock status".At this time, the flexible content model and custom field function of Anq CMS are particularly important, as it allows us to expand the content attributes according to the uniqueness of our business.

Why are custom fields so important?

One of the core strengths of AnQi CMS is its 'flexible content model'.This means you can define exclusive data structures for different content types according to your business needs.This high degree of customization breaks the limitations of the traditional CMS fixed fields, making your website content management more in line with actual operations.

For example, if your website is selling products, then a product detail page should include information such as SKU, price, stock quantity, brand, material, and target audience, in addition to the product name, description, and images.By custom fields, you can add these unique properties to the product model, so that each product entry has complete and standardized information.This not only facilitates background management, but also provides a solid foundation for the refined display of the front-end page.

Creation and type overview of custom fields

Under the "Content ManagementIn the model editing interface, you can add exclusive custom fields for the model.

These fields are very rich, covering a wide range from simple text inputs to complex options, including:

  • Single-line text:Suitable for brief text information, such as product models, source of articles.
  • Number:Only numbers can be entered, suitable for prices, inventory, page views, and so on.
  • Multi-line text:Suitable for long text descriptions, such as product features, event rules, and supports rich text editor.
  • Single choice:Provide multiple options, but only one can be selected, such as 'Do you recommend?' or 'Status'.
  • Multiple selection:Provide multiple options, allow multiple selections, such as product "color options", "applicable seasons".
  • Dropdown selection:Looks similar to single choice, but presented in a dropdown menu on the front end.

Set each field's "parameter name" (for backend display) and "call field

Display the core method of custom field on the front-end page

AnQi CMS adopts a template engine syntax similar to Django, using double curly braces{{变量}}Output content through{% 标签 %}Implement logical control. For custom fields, we mainly obtain and display them in two ways: directly referencing specific fields, or traversing all custom fields.

1. Directly reference a single custom field value

If you know exactly which custom field to display, you can use it directlyarchiveDetailLabel to obtain.This tag is mainly used for the document detail page, it can obtain the detailed information of the current document, including all custom fields.You only need to specify the name of the custom field "call field".

Assuming you have added the following custom fields to the product model:

  • Product Model(Invocation

Related articles

How to dynamically display content on the AnQiCMS document list page through filtering conditions?

How to make users more efficiently find and browse content in website operation is the key to improving user experience and website value.Especially for document list pages, if a flexible filtering function can be provided, allowing users to dynamically adjust the display of content according to their needs, it will undoubtedly greatly enhance the interactivity and usability of the website.AnQiCMS with its flexible content model and powerful template tag features can easily meet this requirement.

2025-11-08

How does the inheritance mechanism of the category template affect the content display of the subcategory page?

The inheritance mechanism of AnQi CMS category templates: How to balance the consistency of page content and personalized displayAnQi CMS deeply understands this, and its inheritance mechanism of classification templates is specifically designed to help us cleverly solve this problem.

2025-11-08

How to configure and display custom Banner images and thumbnails for the AnQiCMS category page?

AnQiCMS (AnQiCMS) provides us with very flexible content management capabilities, one very practical feature is that it can configure and display custom Banner images and thumbnails for category pages.This not only makes our website look more professional and beautiful, but also effectively improves the user experience and the efficiency of content organization.Why does the category page need a custom Banner image and thumbnail?

2025-11-08

What is the difference between SEO title and document title? Where do they show up?

In website operation, we often encounter the concepts of content title and SEO title.Although they are all related to the 'title', there is a clear and important distinction between them in terms of actual application and display location.Understanding and effectively using these two things is the key to making website content both attractive to visitors and favored by search engines.

2025-11-08

How to correctly render Markdown content (including formulas, flowcharts) as HTML display in AnQiCMS?

AnQiCMS has always been committed to providing efficient and flexible solutions in content display, especially for the increasingly popular Markdown format in modern content creation, which includes complex content with mathematical formulas and flowcharts. AnQiCMS also provides a comprehensive support mechanism to ensure that these contents can be correctly parsed and beautifully presented on the web. To achieve the correct rendering of Markdown content (including formulas and flowcharts), it mainly involves two aspects: the first is the internal handling of Markdown text by the AnQiCMS system...

2025-11-08

How to display a list of user-submitted comments on a website and handle the review status?

In website operation, user comments are an important element for building a community, obtaining feedback, and enhancing content interaction.For friends who use AnQiCMS (AnQiCMS) to build and manage websites, efficiently displaying user comments and managing their review status is a key factor in ensuring the quality of website content and user experience.The AnQiCMS provides very flexible and practical functions for this.

2025-11-08

How to display the user submitted comment form and its custom fields in AnQiCMS template?

In website operation, collecting user feedback and inquiries is an important link to improve service quality and understand user needs.AnQiCMS (AnQiCMS) provides a flexible and powerful message management function, allowing you to easily display a message form in the front-end template and support custom fields to meet the information collection needs of different business scenarios.To implement dynamic display of user submitted comment forms and custom fields in AnQiCMS templates, we mainly use a core tag: `guestbook`

2025-11-08

How to display the friend link list on the AnQiCMS front-end page?

Friendship links are a way for websites to recommend each other, not only can they increase the number of external links to the website, but also be beneficial for search engine optimization (SEO), but also provide visitors with more entry points to related resources, enhancing the user experience.AnQiCMS provides a very convenient function for us to manage and display friend links. Next, we will learn together how to set up friend links in AnQiCMS and display them on the website's frontend page.### One, manage the friendship link in AnQiCMS background In AnQiCMS, managing friendship links is very intuitive

2025-11-08