How to obtain and display custom parameter fields on the Anqi CMS article detail page?

Calendar 👁️ 68

In website operation, we often need to display personalized information beyond the standard title, content, and publication date.AnQi CMS provides us with the ability to add custom parameter fields to articles, products, and other content, thereby meeting various diverse display needs.This article will thoroughly explain how to obtain and elegantly present these custom parameter fields on the Anqi CMS article detail page, making your content more expressive.

Understand the custom parameter fields of Anqi CMS and their importance

The "Flexible Content Model" of AnQi CMS is a core feature that allows you to define additional attributes for your website content based on specific business needs and content types.For example, if you operate an e-commerce website, the product detail page may need to display in addition to the name, description, such as 'brand', 'model', 'inventory', 'product features', etc.;And for an information blog, articles may need fields such as 'author biography', 'original link', 'reading time', and even 'specialized field'.This additional information set for specific purposes is what we call custom parameter fields.

Their importance is reflected in:

  • Personalized display: Allow website content to break free from the monotonous structure, making it more in line with business logic and user expectations.
  • Data structuring: Helps in categorizing, filtering, and managing content, enhancing the organization of data.
  • Operational EfficiencyTo solidify specific information into fields for convenient content editing and subsequent calls.

In the Anqi CMS backend management interface, you can configure these fields under "Content Management" and "Content Model".Each custom field needs a unique 'call field' (also known as 'parameter name') as an identifier for its reference in the template, and you can also choose the data type of the field, such as single-line text, multi-line text (supporting rich text), number, radio, checkbox, or dropdown selection.These backend settings are the foundation for successful front-end calls.

Second: Create custom parameter fields: prerequisite for front-end display.

Before displaying custom parameters on the article detail page, we first need to add these fields in the Anqi CMS backend for the corresponding content model.

  1. Access content model managementLog in to the AnQi CMS backend and navigate to "Content Management" -> "Content Model".
  2. Select or create a new model.In here, you can choose to edit the built-in "article model" or "product model" of AnQi CMS, or create a new content model according to your business needs.
  3. Add custom fieldIn the editing page of the selected model, find the "Content Model Custom Field" area, click "Add Field".
    • Parameter NameThis is the key identifier called in the template, it is recommended to use lowercase letters, for examplearticleAuthor/productMaterial.
    • Field invocationThis is the actual storage name of the field in the database, the system will usually automatically generate according to the parameter name, keep the default.
    • Field type: Choose the data type you want to store.For example, "single-line text“Numbers” are used for numeric data, while “single choice/multiple choice/dropdown” are used for preset options.
    • Mandatory?:Select according to your business logic to ensure that no key information is missed.
    • Default value:You can preset the display content when the field is not filled in during content editing.
  4. Save model settingsAfter adding and configuring all custom fields, be sure to click Save Content Model so that the new fields will take effect when publishing or editing content belonging to the model.

Once the field is created, when you edit or publish an article associated with this content model, you will be able to see and fill in the values of these custom fields in the "Other Parameters" area of the editing page.

Chapter 3, Retrieve and display custom parameters in the article detail page

After setting up the custom parameters in the background, the next step is how to display them in the article detail page on the front end (usually corresponding to the/template/{模型table}/detail.htmlOr you can customize your document template

Related articles

How to configure and display the Banner slideshow image on the Anqi CMS homepage?

In Anqi CMS, configuring and displaying the Banner carousel image on the homepage is a key step to enhance the visual appeal and content presentation of the website.This process involves uploading and grouping of background images, as well as writing front-end template code. ### One, configure Banner Carousel Image in Background The Banner images on the homepage are not randomly stacked, they need to be carefully managed to ensure they are displayed as expected on the front end.AnQi CMS provides a flexible way to handle these images: 1. **Image upload and grouping:** Typically

2025-11-08

How to set independent display templates for different article categories in AnQi CMS?

Our Aanqi CMS offers high flexibility in content display, one very practical feature is that it can set independent display templates for different article categories.This means you can customize unique visual styles and layouts for different categories of content, thereby highlighting the content, improving user experience, and even meeting specific SEO requirements. To achieve this goal, we need to start from several aspects such as preparing the template file, setting up the background, and designing the template content.Understanding the concept of categories and article templates in AnQi CMS

2025-11-08

How to implement the 'Recommended Attributes' tag highlighting in the front-end of AnQi CMS?

AnQi CMS provides a powerful content management function, among which the "recommended attribute" tag is a very practical tool in content operation.It can help us effectively organize and highlight the important content on the website, whether it is to improve the user experience or to better optimize SEO, these properties can play a key role.Understanding "Recommended Attributes": A Tool for Content Operations In Anqi CMS, "Recommended Attributes" are special identifiers set for each document (such as articles, products, etc.).

2025-11-08

How to display the contact information and social media links on AnQi CMS templates?

In website operation, clearly and effectively displaying contact information and social media links is crucial for building customer trust and promoting interaction.AnQiCMS (AnQiCMS) provides a convenient and flexible way to easily integrate key information into website templates. --- ### One: Prepare: Configure contact information and social media in the Anqi CMS backend Before displaying contact information and social media on the website front end, we need to configure it in the Anqi CMS backend.This is like preparing a complete business card for our website.1

2025-11-08

How to display the directory or title structure of article content in AnQi CMS?

On a content-rich website, providing a clear table of contents or title structure for long articles can greatly enhance the user's reading experience and also help search engines better understand the hierarchy of page content, thereby having a positive impact on SEO performance.AnQi CMS is well-versed in this and provides flexible and powerful features to easily meet this requirement.

2025-11-08

How to use the Tag feature of AnQi CMS to display related content aggregation pages on the front end?

The AnQi CMS provides a powerful and flexible tag (Tag) feature that helps us better organize content, improve the website's SEO performance, and provide users with a more convenient way to discover content.By making good use of tags, we can easily create content aggregation pages, allowing visitors to quickly find related articles or products based on their interests.Understanding the Core Value of Tag FunctionWhen we assign one or more tags to a document

2025-11-08

How can AnQi CMS ensure that the HTML content in the rich text editor is secure and displayed correctly?

In website content management, the use of rich text editors greatly facilitates the creation and beautification of content.However, ensuring that the HTML content entered by the user is both safe and correctly displayed on the front end while allowing free formatting is a core challenge that every content management system must face.AnQiCMS as an enterprise-level content management system provides multi-layered security mechanisms in this regard.Firstly, AnQiCMS has established a solid security foundation from the bottom of the system architecture.

2025-11-08

How to implement dynamic display of breadcrumb navigation in AnQi CMS templates?

In website operation, Breadcrumb Navigation plays a crucial role.It not only can intuitively display the user's position level in the website, helping users understand the relationship between the current page and the entire website structure, but also can effectively improve the user experience, reduce the bounce rate, and have a positive impact on search engine optimization (SEO).For websites built using AnQiCMS, implementing dynamic breadcrumb navigation is a simple and efficient feature enhancement.AnQiCMS as a Go-based

2025-11-08