How to add custom parameters to the contact information settings in AnQiCMS?

Calendar 👁️ 69

In the digital age, a high-efficiency, professional website is a key bridge for enterprises to communicate with users.AnQiCMS (AnQiCMS) is an enterprise-level content management system based on the Go language, deeply understanding this field, not only providing strong content management capabilities, but also considering the operators in detail.Today, let's delve into a seemingly simple yet extremely practical feature: how to add custom parameters in the contact information settings of AnQiCMS, making your website information display more flexible and tailored to business needs.

Flexible configuration, making contact information not uniform

In website operations, a company's contact information is the foundation for building trust and promoting communication.However, the preset contact information field often fails to meet the personalized needs of all enterprises.Perhaps you need to display a dedicated WhatsApp number, or a specific Telegram ID, or even an account on an uncommon industry communication platform.AnQiCMS understands the importance of personalization and therefore provides a highly flexible custom parameter function to perfectly match your contact information settings to business scenarios.

To begin customizing your contact information, first you need to log in to the AnQiCMS admin interface. In the left menu bar of the back end, find and click on the “Backend settingsPlease select an option from the dropdownContact information settings.

After entering the "Contact Information Settings" page, you will see some commonly used contact information fields preset by AnQiCMS, such as contact person, phone number, address, email, WeChat ID, and WeChat QR code.These default fields meet most basic needs and make it convenient for you to quickly fill in and display the core contact information of the enterprise.

Add custom parameters: Expand your communication channels

The true flexibility is reflected in the "Custom settings parameters" area.This is the stage where you create a dedicated contact method according to your specific business needs.You can imagine that your business needs to highlight a specific customer service hotline number, or it could be an uncommon social media account, or even an instant messaging tool commonly used in international business, such as a "Skype ID".By custom parameters, all of these can be easily achieved.

There are several key elements to note during the process of setting custom parameters:

The first is the quotation markParameter NameThis is the unique identifier used when calling the custom contact method in the template.To ensure the accuracy and consistency of template calls, we strongly recommend that you use English letters for naming, and AnQiCMS will automatically convert them to camel case (for example, if you entercustomer hotlineThe system will automatically process it asCustomerHotlineAlthough the system also supports Chinese parameter names, using English naming would be a better practice from a long-term maintenance and development perspective

The next isParameter valueThis is the specific content you want to display on the website front-end. For example, if you set the parameter name to 'Customer Service Hotline', then the parameter value can be filled in.400-123-4567If the parameter name is 'Skype ID', then the parameter value can be your Skype username.

Finally is "NoteThis field is not displayed on the website front-end. It is purely for the convenience of you and your team to better understand the purpose and meaning of this parameter.Clear notes can effectively improve the efficiency of background management, especially when there are many custom parameters, which can help you quickly identify the function of each parameter.

For example, suppose you want to add a dedicated 'customer service hotline' phone number on your website. You just need to click add in the 'custom settings parameters' area, then fill in the 'parameter name' in the boxCustomerHotline(or your desired English name), enter it in the 'Parameter Value' box400-123-4567And note in the "notes" the "24-hour customer service hotline". This way, a completely new custom contact method is configured.

Display custom parameters on your website.

It is not enough to set the parameters in the background; you also need to present them on the website's frontend page to truly make it work.AnQiCMS through simple and powerful template tags makes this process easy.

In your template file, AnQiCMS provides a namedcontactThe dedicated tag, serving as a bridge between backend contact settings and frontend display.Whether it is the default contact method or the custom parameter you just created, it can be called through this tag.

To call a default contact method, such as a phone number, you can write:

<span>联系电话:{% contact with name="Cellphone" %}</span>

Here, name="Cellphone"Specified is the preset "contact phone" field you want to retrieve.

And for the parameters you define, the calling method is equally intuitive. For example, the 'customer service hotline' parameter, its parameter name isCustomerHotline. You can call it like this in the template:

<span>客服专线:{% contact with name="CustomerHotline" %}</span>

The system will accurately output here based on the "parameter value" you set in the background400-123-4567.

If you are operating multiple sites and want to call the contact information of other sites on a specific site,contactTags also supportsiteIdParameters allow you to precisely control the data source, but in most cases, you do not need to manually specify this parameter.

Enhance user experience and operational efficiency

By setting up the custom contact method through AnQiCMS, your website will be able to provide richer and more user-friendly communication channels.This not only improves user experience and enhances user stickiness, but also significantly improves the efficiency of enterprises in handling consultations and services.In order to provide strong support for your multilingual communication channels for global business or for exclusive service channels provided for segmented markets, this feature of AnQiCMS can offer you strong support.

Frequently Asked Questions (FAQ)

1. Can I use non-English characters as parameter names? For example, can I use 'Customer Service Hotline'?AnQiCMS supports you to enter non-English characters as 'parameter name', the system will automatically convert it to camel case for template calling. For example, if you enter 'customer service hotline', the system may process it internally asKeFuZhuanXianor a similar form. However, in order to maintain the uniformity and readability of the template code, we stillstrongly recommendUsing English letters as parameter names helps avoid potential encoding issues and makes it easier for developers to maintain templates.

2. Why doesn't the website front-end display the custom parameters I added?This usually has several reasons:

  • Cache problem:Please first try to clear the system cache of AnQiCMS. Find the "Update Cache" in the top menu bar of the backend and click it. It is also recommended to clear your browser cache.
  • Template call error:Check the custom parameter calls in your template file.{% contact with name="..." %}Is the tag correct? Make sure.nameThe value of the attribute is exactly the same as the 'parameter name' set in the background (pay attention to the case).
  • The template file has not been updated:Make sure that the template file you have modified has been uploaded to the server correctly and is effective.
  • Front-end code is missing:You may have only set the parameters in the background, but did not add the correspondingcontacttags in the front-end HTML/Twig template to display it.

How to add an icon next to a custom contact method?AnQiCMS'contactThe label is responsible for outputting the text content of the "parameter value" you set in the background. If you want to add an icon next to the text, this needs to be done in your template file, surroundingcontactThe output of the tag, implemented manually using HTML and CSS. For example:

<span class="contact-item">
    <i class="fas fa-headset"></i> <!-- 这是一个Font Awesome图标示例 -->
    客服专线:{% contact with name="CustomerHotline" %}
</span>

You need to include the corresponding icon library's CSS file (such as Font Awesome) in the website and control the size and color of the icons through CSS styles.

Related articles

How to configure Baidu and Bing link active push in AnQiCMS?

As a senior website operations expert, I am well aware that in the current fiercely competitive content ecology, how to make high-quality content faster to be discovered and indexed by search engines is the focus of every operator.Actively submitting new links to search engines is undoubtedly a key step in improving website visibility and SEO effectiveness.Today, let's delve into how to easily configure the active link push function of Baidu and Bing in the efficient AnQiCMS.

2025-11-07

How to configure the pseudo-static rules of AnQiCMS and what naming modes are supported?

As an experienced website operations expert, I know that a friendly URL structure is of great importance to the SEO performance and user experience of a website.AnQiCMS is a corporate-level content management system specially designed for content operators, and naturally provides strong and flexible support in this regard. The pseudo-static rule configuration is the core of it.Today, let's delve into the pseudo-static rules of AnQiCMS and see how it can help us build a more competitive website. ### Static URL Rewriting: Why It Matters, How AnQiCMS Handles It First

2025-11-07

How to perform image classification and batch operations in AnQiCMS's image resource management?

As an experienced website operations expert, I am well aware that in the increasingly digitalized world of content, images are not just decorations, but also key elements to enhance user experience, optimize search engine rankings, and even carry brand value.In AnQiCMS (AnQiCMS) such an efficient and customizable content management system, how to intelligently manage a large amount of image resources so that they are both orderly and efficient is a core skill that every operator should master.

2025-11-07

How to create independent pages such as 'About Us' and 'Contact Us' in AnQiCMS single-page management?

Certainly, as an experienced website operation expert, I am very willing to deeply analyze the essence of single-page management in AnQiCMS and guide you to easily master the creation and optimization of independent pages such as 'About Us' and 'Contact Us'. --- ## Single Page Management of Anqi CMS: Easily build independent pages such as "About Us" and "Contact Us" In modern website operations, independent pages such as "About Us" and "Contact Us" play a vital role.They are not only a window for displaying the corporate image and conveying core values, but also for users to build trust

2025-11-07

How to enable Markdown editor and display mathematical formulas and flowcharts in AnQiCMS?

As an experienced website operations expert, I know that content quality is the core of attracting and retaining users.In AnQiCMS such an efficient and flexible content management system, making full use of its various functions to enrich content expression is crucial for enhancing the professionalism and user experience of the website.Today, let's delve into a very practical advanced topic: how to enable the Markdown editor in AnQiCMS and make your mathematical formulas and flow charts beautifully displayed on the web.AnQiCMS as a corporate-level content management system based on the Go language

2025-11-07

How to configure the website name, address, logo, etc. in AnQiCMS's 'Global Settings'?

As an experienced website operations expert, I am well aware of the importance of a website's basic configuration, especially for a powerful and SEO-focused enterprise-level content management system like AnQiCMS (AnQiCMS), whose 'global settings' are self-evident.It is not just about filling in a few items of information, but also about laying the foundation for your website's brand image, ensuring smooth operation, and future expansion.Today, let's delve into how to elegantly and efficiently configure your website name, address, logo, and other core information in the 'Global Settings' of AnQiCMS.

2025-11-07

How to customize navigation categories and link types in AnQiCMS's navigation settings?

## AnQiCMS Navigation Settings: Customize Your Website's Structure and User Experience In today's digital age, a website's navigation system is more than just a tool to guide users through the site; it is the 'skeleton' of the website architecture, directly affecting user experience, information retrieval efficiency, and even search engine optimization (SEO) performance. As an enterprise-level content management system developed based on the Go programming language, AnQiCMS understands the importance of the navigation system and therefore provides a highly flexible and easy-to-customize navigation setting function, aimed at helping businesses and content operators easily build a clear

2025-11-07

How to install and manage multiple sites on the same server with AnQiCMS?

## AnQiCMS: Easily manage multiple sites on the same server and implement your brand matrix management As an experienced website operations expert, I know that in today's digital age, many companies and content creators may have multiple brands, product lines, or regional sites. How to efficiently and economically manage these content platforms is often a headache.The traditional method may mean deploying a separate system for each site, which consumes a lot of server resources and operation and maintenance efforts.

2025-11-07