How to flexibly display multiple WhatsApp contacts in Anqi CMS? UnlockcontactAdvanced usage of tags

In today's global business environment, WhatsApp has become an important tool for efficient communication between enterprises and customers.Whether it is sales consultation, customer service, or specialized support for different products or regions, businesses may need to display multiple WhatsApp contact methods on their websites.The Anqi CMS is a powerful and flexible content management system that naturally also provides a convenient way to display contact information.multipleWhen contacting WhatsApp contacts, you may be confused by the built-incontactCan the label handle it? Don't worry, it can be flexible by cleverly using its custom parameter function.

contactThe basics and limitations of the label.

Let's review the AnQi CMS firstcontactThe basic usage of tags. According to the document description,contactTags are mainly used to obtain contact information configured on the back-end, and their basic syntax is{% contact 变量名称 with name="字段名称" %}For example, if you want to display the default WhatsApp contact information in a template, you might write it like this:

<li>
    <span>联系WhatsApp:</span>
    <span>{% contact with name="WhatsApp" %}</span>
</li>

This can conveniently retrieve the single "WeChat ID" or "WhatsApp" field configured in the "Global Settings" -> "Contact Information Settings" of the Anqi CMS backend. But it is evident that this is the defaultname="WhatsApp"The field is designed for a single contact method and cannot directly meet the need to display multiple WhatsApp numbers.

Break through the limitations: Make good use of 'Custom Settings Parameters'

The strength of AnQi CMS lies in its high flexibility and scalability, which includes customization of contact information.To display multiple WhatsApp contacts, we need to use the "Custom Settings Parameters" feature in the "Contact Settings".

Step 1: Configure multiple custom WhatsApp contact methods in the background

  1. Log in to the Anqi CMS backendNavigate to 'Background Settings' -> 'Contact Settings'.
  2. Locate the custom settings parametersAt the bottom of the page, you will find a 'Custom Settings Parameters' area.
  3. Add a new custom parameterClick the "Add" button to add an entry for each additional WhatsApp contact.
    • Parameter name (for template use): This is the unique identifier you will use when calling this WhatsApp number. It is recommended to use an English and descriptive name for clarity and ease of management, such as:WhatsAppSales(Sales Department WhatsApp),WhatsAppSupport(Technical Support WhatsApp),WhatsAppNorthAmerica(North America WhatsApp) etc. The system will automatically convert it to camel case.
    • Parameter value (actual contact information)Enter your WhatsApp number here, usually including the international dialing code, for example+1234567890.
    • Note (internal description)Add a brief description to this contact method, to help you or your team members understand its purpose, for example “Exclusive WhatsApp for Sales Department”, “Customer Service Hotline”}]

For example, you can set it like this:

Parameter Name Parameter value Note
WhatsAppSales +1234567890 Sales Department WhatsApp
WhatsAppSupport +1987654321 Technical Support WhatsApp
WhatsAppMarketing +4471234567 Marketing Promotion WhatsApp

After the configuration is completed, don't forget to save your settings.

Step two: Call these custom WhatsApp contact methods in the template.

Once you have configured these custom parameters in the background, you can call them easily through the website front-end template.contactThe way to call them is similar to the default fields, just that...nameReplace the parameter value with your custom 'parameter name'.

For example, to display the sales department's WhatsApp on the page, you can write the template code like this:

{# 调用销售部门的WhatsApp #}
{% contact contactSales with name="WhatsAppSales" %}
{% if contactSales %}
    <p>联系销售:<a href="https://wa.me/{{ contactSales }}" target="_blank">点击此处通过WhatsApp联系我们</a></p>
{% endif %}

{# 调用技术支持的WhatsApp #}
{% contact contactSupport with name="WhatsAppSupport" %}
{% if contactSupport %}
    <p>技术支持:<a href="https://wa.me/{{ contactSupport }}" target="_blank">需要技术帮助?立即WhatsApp我们!</a></p>
{% endif %}

{# 调用市场推广的WhatsApp #}
{% contact contactMarketing with name="WhatsAppMarketing" %}
{% if contactMarketing %}
    <p>市场合作:<a href="https://wa.me/{{ contactMarketing }}" target="_blank">探索合作机会,WhatsApp市场部</a></p>
{% endif %}

In this code block:

  • We pass{% contact contactSales with name="WhatsAppSales" %}Assign the value of the parameter named by the background configurationWhatsAppSalesto a parameter namedcontactSales.
  • {% if contactSales %}to determine whether the variable has a value, to avoid displaying a blank page when the background is not configured.
  • https://wa.me/{{ contactSales }}It is the standard WhatsApp click chat link format,target="_blank"then the link will open in a new window.

In this way, you can display any number of WhatsApp contacts according to your business needs, and each contact can have its specific purpose description and link text.

Summary

Of Security CMScontactLabel combined with its flexible "Custom settings parameters" feature, can perfectly meet the need to display multiple WhatsApp contacts on the website.This method is not only powerful but also easy to operate, does not require modifying the core code, and greatly enhances the efficiency and flexibility of website content operations.By reasonably planning and naming these custom parameters, you can provide customers with more detailed and convenient communication channels, thereby improving user experience and conversion rates.


Frequently Asked Questions (FAQ)

1. Does this custom parameter method apply to other social media or contact methods besides WhatsApp?

Of course!The "Custom Setting Parameters" feature of Anqi CMS is universal.In addition to WhatsApp, you can also add Facebook Messenger links, Telegram ID, Line ID, Skype accounts, and even specific email addresses for different departments, etc.contactTagging can be used. This provides your website with a great degree of freedom in displaying contact information.

Can I display different WhatsApp contacts on different pages or areas of the website?

Yes, you can.Once you define these custom parameters in the "Contact Information Settings" of the Anqi CMS backend, they will be available site-wide.This means you can display a total sales WhatsApp on the homepage, show product-related support WhatsApp on the product detail page, and list all department WhatsApps on the 'Contact Us' page.You just need to call the corresponding custom parameters in the template file as needed.This detailed display helps improve user experience and communication efficiency.

3.If I have many WhatsApp contacts, how can I effectively organize them on the page to avoid information becoming too chaotic? Https://www.example.com/example-page.html

When the number of WhatsApp contacts is large, it is recommended to adopt the following organizational strategies:

  • Group displayGroup related contacts, for example "Sales Inquiry", "Technical Support", "Negotiation", etc., each group containing the corresponding WhatsApp numbers.
  • A dedicated "Contact Us" pageCreate a separate "Contact Us" page, listing all contact methods and their functions in detail, and guide users to access it through navigation links.
  • Contextually relevant displayOn a specific product or service page, only display the WhatsApp number most relevant to the product/service to reduce user selection confusion.
  • Use an icon or a brief description: Pair each WhatsApp number with a clear icon and a brief description so that users can understand at a glance.