How to display custom field content (such as author, source) in AnQiCMS templates?

Calendar 👁️ 64

AnQiCMS with its flexible content model and powerful template tag system provides great convenience for personalized display of website content.In website operations, we often need to add some information beyond standard fields for articles, products, or other content, such as the author of the article, source of content, product batch number, or specific SEO information.This non-standardized information, AnQiCMS calls it "custom fields", which can make your website content more professional, detailed, and meet specific business needs.

Understanding the value of custom fields

The introduction of custom fields greatly enhances the adaptability of the content management system.It breaks the rigid restrictions of traditional CMS on content structure, allowing you to create dedicated data items that meet your specific industry characteristics and content types.For example, a technology blog may need fields such as 'review editor' and 'distribution channels'; a job recruitment website may need to add fields such as 'work location' and 'education requirements'.AnQiCMS's flexible content model is designed to meet these personalized content display requirements, allowing you to create unique data structures for different content types (such as articles, products).

Set custom fields in AnQiCMS background

To display custom field content in the template, you first need to make sure that these fields have been correctly set up in the AnQiCMS background.

  1. Log in to the AnQiCMS backendEnter the back-end management interface.
  2. Navigate to content model managementFind "Content Management" in the left menu and click on "Content Model."
  3. Select and modify the modelHere you will see the system preset "article model", "product model", and other custom models you may have created.Select the model you want to add a custom field to (for example, "Article Model
  4. Add a new custom fieldOn the model editing page, scroll to the "Content Model Custom Fields" area. Click the "Add Field" button to define the new data item.
    • Parameter NameThis is the display name of the field when editing articles in the background, such as 'article author' or 'source of content'. This name is for background editors.
    • Field invocationThis is the unique identifier used to refer to the field content in the front-end template.This name is crucial, as it will directly determine how you access this data in the template.authororsource.
    • Field type: Select the appropriate type for the content stored in the custom field, such as 'Single-line text' (suitable for author name, source name), 'Multi-line text' (suitable for complex description), 'Number', 'Single choice', 'Multiple choice', and so on.
    • Mandatory?: Decide based on the importance of the field.
    • Default value: If the field has common values, you can set a default value that can be automatically entered when editing articles.
  5. Save model configurationAfter completing the field settings, be sure to click the bottom of the page.

Related articles

How to format the article publish timestamp into a readable date and time in AnQiCMS template?

In website content operation, the publication time of articles is often one of the focuses of users, as it not only affects the interest of users in reading but also has a potential impact on the timeliness and authority of the content.However, the time information stored in the database is usually in a machine-readable timestamp format, such as a series of numbers, which is difficult for ordinary visitors to understand.AnQiCMS fully considered this point, providing a flexible way for you to convert these timestamps into clear and easy-to-read date and time formats, greatly enhancing the user experience.

2025-11-07

How to display the friend link list in the admin panel of the AnQiCMS website?

On the AnQiCMS website, the display of the background management friends link list is a very practical feature. It not only helps to enhance the website's SEO effect, but also provides more valuable external resources for visitors.AnQiCMS provides a simple and efficient mechanism for managing and displaying these links, allowing even beginners to get started easily.

2025-11-07

How to get and display the detailed content and Banner image of a single page in the AnQiCMS template?

In AnQi CMS, it involves understanding the management methods of a single page and mastering the flexible application of template tags to retrieve and display the detailed content of a specific single page and its associated Banner image.AnQiCMS provides an intuitive admin interface and a powerful template engine, making this task simple and efficient. ### In-depth Understanding of AnQi CMS Single Page The "Single Page" feature of AnQi CMS is designed for pages with fixed structures, relatively independent content, and no frequent updates, such as "About Us", "Contact Information", "Service Introduction", and so on.

2025-11-07

How to display all single page lists on AnQiCMS template?

In website operation, we often need to create some independent pages, such as "About Us", "Contact Information", "Terms of Service", or some special introduction pages.These pages are usually called "single-page", their content is fixed, they do not belong to the conventional article or product categories, but they are an indispensable part of the website.When you have accumulated a large number of single pages on your website, you may wish to display a list of these single pages in a specific location, such as the bottom of the website, the sidebar, or even on a dedicated page, to facilitate browsing and searching for visitors.

2025-11-07

How to implement lazy loading of image content in AnQiCMS templates to optimize performance?

In the digital age, the speed of website access has become one of the key indicators for measuring user experience and search engine rankings.Images are an important part of web page content and often also a major factor affecting page loading speed.When a page contains a large number of high-definition images, the browser needs to load all image resources before rendering the page, which undoubtedly greatly increases the user's waiting time.This problem was solved by the emergence of lazy loading (Lazy Loading) technology.The core idea of lazy loading images is to delay loading images that are not within the current viewport (i.e., the visible area of the user's current screen)

2025-11-07

How to automatically generate and display the content directory (ContentTitles) on the article detail page of AnQiCMS?

## How to automatically generate and display the content directory (ContentTitles) on the AnQiCMS article detail page??For long content, a clear table of contents (also known as "article outline" or "chapter navigation") can greatly enhance the reading experience of users.It not only helps readers quickly understand the structure of the article, but also allows them to directly jump to the chapters of interest, thereby improving the readability and user satisfaction of the content.

2025-11-07

How to get and display related article lists according to Tag ID in AnQiCMS template?

In a content management system, Tag (tag) plays an important role.They can not only help us flexibly organize content, but also associate articles with similar themes across different categories, and can effectively improve the website's internal link structure and user experience.When a user is interested in a specific topic, by clicking on a Tag, they can easily view all related articles.AnQiCMS provides a set of intuitive and powerful template tags that allow you to easily retrieve and display these related article lists based on Tag ID.

2025-11-07

How to display all the Tag tags belonging to the current article in AnQiCMS template?

Flexible display of article tags in AnQiCMS templates Tags are a highly effective content organization method in website content operation.They can not only help users find relevant content faster, enhance the browsing experience of the website, but also have an indispensable positive effect on search engine optimization (SEO).AnQiCMS as a feature-rich enterprise-level content management system naturally also provides powerful tag management and call functions, allowing us to easily display all tags associated with the current article on the article detail page.

2025-11-07