How to customize system parameters in AnQiCMS backend to meet the special calling requirements of the frontend template?

Calendar 👁️ 60

Unlock the potential of the front-end template: The Art of AnQiCMS Backend Custom System Parameters

In website operation, we often encounter such situations: front-end templates need to display some non-standard but crucial information for the business, such as a special marketing campaign link, WhatsApp contact information other than WeChat and phone, or a disclaimer at the bottom of a specific page.If each modification touches the code, it will undoubtedly greatly reduce the operational efficiency.AnQiCMS as an enterprise-level content management system, deeply understands this, and provides us with flexible and powerful custom system parameter functions, allowing us to easily manage these 'special requirements' in the background, and seamlessly call them in the front-end template, thus realizing the refined operation of content and display.

This article will delve into how to customize system parameters in the AnQiCMS backend, and guide you on how to elegantly call these parameters in the frontend template, ensuring that your website can maintain efficient content updates while meeting various unique display needs.

Understand the requirements: Why do we need to customize system parameters?

The website operation is a dynamic process, the content display requirements often change.AnQiCMS is built with rich preset fields, which are enough to deal with most common content, such as website name, copyright information, contact phone number, etc.But there are always some personalized needs that cannot be met by general fields. For example:

  • Multi-channel contact information:In addition to the default phone, email, and WeChat, you may also need to display WhatsApp, Telegram, or Facebook Messenger links.
  • Temporary promotional activity:A prominent banner is needed on the homepage or a specific area, linking to the latest promotional page, and the link needs to be updated frequently.
  • Specific page statement:A product category page needs to display industry-specific legal statements or risk warnings.
  • Third-party service integration:Embed a dynamically adjustable third-party statistics code ID or API Key.

Faced with these scattered but important requirements, if you modify the template file each time, it is not only inefficient but also easy to introduce errors.The AnQiCMS custom system parameter feature was born to solve these pain points, it frees these 'variables' from the code, and entrusts them to be managed centrally by operations personnel in the background.

AnQiCMS Backend: Entry for parameter customization.

In the AnQiCMS backend, the customization of system parameter settings is mainly concentrated in several sub-menus under the "Backend Settings" area. These two areas are the starting points for parameter expansion:

  1. Global feature settings(help-setting-system.mdReference):This area mainly manages the basic information of the website, such as the website name, Logo, filing number, website address, etc.It also provides a "Custom Setting Parameters" section that allows you to add any parameters related to the website's global configuration that are not in the default list.For example, you can define a "Help Page URL (HelpUrl)" or "Website Theme Color (ThemeColor)" and so on here.

  2. Contact information settings(help-setting-contact.mdReference):As the name implies, this is the place to manage all external contact methods, such as contacts, phone numbers, addresses, email addresses, and WeChat IDs, etc.Similarly, this module also has the function of "custom setting parameters", which is very suitable for adding additional social media links or specific business contact information, such as the WhatsApp account mentioned earlier.

Through these two entries, you can abstract the content that may have been hard-coded in the template into parameters that can be flexibly configured in the background.

Precise customization: Creating and managing custom parameters

Let us take the example of adding a custom parameter named 'Help Page Link' in the 'Global Feature Settings' to demonstrate the creation process.

  1. Navigate to the settings page:Log in to the AnQiCMS backend, click the left menu's 'Backend Settings', then select 'Global Function Settings'.
  2. Add custom parameters:Scroll to the bottom of the page, find the "Custom Settings Parameters" area. Click the "Add Custom Parameter" button.
  3. Enter parameter information:
    • Parameter name:This is the most important field, it will serve as the identifier for calling this parameter in the front-end template. It is recommended to use camelCase naming convention for the sake of code tidiness and readability, for exampleHelpUrlAvoid using Chinese or special characters, as this may cause template parsing errors.
    • Parameter value:Fill in the actual content of the parameter, for examplehttps://en.anqicms.com/helpThis value can be plain text, a URL, or even a short HTML snippet (if needed, the front-end should pay attention to safe escaping when calling).
    • Note:This is an optional but strongly recommended field. Here, clearly describe the purpose of this parameter, such as 'link to the user help and support page', which will greatly help other operators or future you to understand the meaning of this parameter.
  4. Save:After filling in, click the save button. At this point, a new custom parameter has been successfully added and is now effective.

The same steps also apply to the custom parameters in the "Contact Information Settings". For example, you can add a "Parameter Name" ofWhatsAppwith a value of+861234567890The parameter marked as 'Customer WhatsApp contact number'.

How to elegantly call custom parameters in the front-end template?

AnQiCMS's template engine adopts a syntax style similar to Django, making it intuitive and efficient to call back-end parameters on the front end. The core lies in the use of specific tags ({% tag %}) and variable ({{ variable }}) to retrieve data. For the custom parameters we just created, we will mainly use{% system %}/{% contact %}and{% diy %}these tags.

  1. Call the custom parameter in the global function setting:{% system %}For custom parameters created in the "Global Feature Settings", you can use{% system %}tags to call. For example, to get the one we defined earlier,HelpUrl:

    <a href="{% system with name="HelpUrl" %}" target="_blank">帮助中心</a>
    

    If you want to store the value you get into a variable for subsequent processing, you can do it like this:

    {% system helpPageUrl with name="HelpUrl" %}
    <a href="{{ helpPageUrl }}" target="_blank">访问我们的帮助页面</a>
    

    This way, even if the link of the help page changes in the future, you only need to modify the parameter value in the AnQiCMS background without touching any code.

  2. Call the custom parameter in the contact information settings:{% contact %}Similar

Related articles

When the website is set to " shutdown status ", what information will AnQiCMS display to the visiting user?

As an experienced website operations expert, I know that sometimes it is necessary to temporarily close the website for maintenance, upgrades, or content adjustments.The management of this "shutdown status" not only concerns user experience, but may also affect search engine rankings.AnQiCMS (AnQiCMS) is a powerful content management system that provides a flexible and comprehensive solution in this regard.

2025-11-06

How to modify the website's filing number and copyright information in the AnQiCMS backend?

As an experienced website operations expert, I am well aware of the importance of website compliance and brand image for long-term development.In China, the website filing number (ICP) is not only a legal requirement but also the foundation of website trust; while copyright information is a strong declaration of your original content, demonstrating professionalism.AnQiCMS as an efficient and user-friendly content management system also provides you with an intuitive and convenient operation interface for setting these key information.

2025-11-06

Does AnQiCMS support custom navigation categories? For example, how to create footer navigation?

As an experienced website operations expert, I am well aware of how important a flexible and versatile website navigation system is for user experience and search engine optimization.Navigation is not only the map for users to explore the website, but also a direct reflection of the structure and content hierarchy of the website.AnQiCMS excels in this aspect, it not only supports but also provides a very intuitive and powerful custom navigation function, allowing you to easily build navigation structures that meet various business needs, whether it is the main navigation, sidebar navigation, or the footer navigation that we are delving into today.### AnQiCMS: Custom Navigation

2025-11-06

How to set up and manage multi-level website navigation on AnQiCMS backend?

## AnQiCMS Multi-level Website Navigation: A Detailed Management Guide from Backend Settings to Front-end Display In today's rapidly changing digital world, a well-structured and easy-to-navigate website is crucial for improving user experience and search engine optimization (SEO).AnQiCMS is an efficient and flexible enterprise-level content management system that understands the importance of navigation and provides an intuitive and feature-rich backend management tool to help operators easily build and maintain multi-level website navigation.

2025-11-06

How to set the Title, Keywords, and Description (TDK) on the AnQiCMS backend?

As an experienced website operations expert, I know that the success of a website cannot be separated from fine-grained content operations and excellent search engine optimization (SEO) strategies.Among the many factors that affect website ranking, the page title (Title), keywords (Keywords), and description (Description), which we commonly refer to as "TDK", are undoubtedly the core elements for search engine extraction, understanding, and user click decision-making.

2025-11-06

How to manage and add contact information (such as phone number, WeChat, WhatsApp) on the AnQiCMS backend?

As an experienced website operations expert, I am well aware of the importance of an efficient content management system for the development of a company, especially in terms of information transmission and customer communication.AnQiCMS (AnQiCMS) leverages its powerful flexibility and ease of use, allowing website operators to easily manage various content, including crucial business contact information.In today's digital marketing era, providing diverse contact channels such as phone numbers, WeChat, WhatsApp, and others is crucial for building customer trust and enhancing user experience.AnQiCMS is well-versed in this, providing intuitive backend functions

2025-11-06

What default language packages does AnQiCMS support? How to switch the default language for the website?

AnQiCMS: Mastering Multilingualism, Full Guide to Website Default Language Settings and Switching As an experienced website operations expert, I am well aware of the importance of multilingual support for websites to reach a broader audience in a global network environment.AnQiCMS (AnQiCMS) is an efficient content management system designed specifically for small and medium-sized enterprises and content operation teams, and its powerful multilingual support function is undoubtedly one of its core highlights.

2025-11-06

How to add a new document and set recommendation attributes (such as headline, recommendation) in the AnQiCMS backend?

As an experienced website operations expert, I fully understand the importance of an efficient content management system for a corporate website.AnQiCMS (AnQi CMS) boasts its excellent flexibility and powerful functions, becoming a tool in the hands of many operators.Today, let's delve into how to easily add a new document in the AnQiCMS backend, and skillfully use recommendation attributes to make your high-quality content stand out among numerous information, reaching your target audience more accurately.

2025-11-06