In today's digital age, a website's contact information is not just cold numbers or addresses; it is a bridge for building trust and communication between users and businesses.Efficiently and accurately displaying this information on the website, and being able to update flexibly as needed, is crucial for any website operator.AnQiCMS as an enterprise-level content management system provides a very intuitive and powerful solution in this regard, allowing you to easily manage these key information without touching complex code.
This article will introduce in detail how to configure and dynamically obtain the contact information of the website in AnQiCMS, ensuring that your website always displays the latest and most accurate contact information.
Back-end configuration: the source of contact information
All dynamic contact methods on the website are concentrated in the AnQiCMS backend settings. This is the 'central brain' where you can manage and update your contact information.
First, log in to the AnQiCMS backend management interface. In the left navigation bar, you will see a menu item named “Backend settings”. Click to enter and continue to select “Contact information settings.
After entering the "Contact Information Settings" page, you will find that the system has pre-set many commonly used contact information fields, such as:
- Contactis usually the contact name you want to display to others.
- Contact phone number:For customer consultation phone number.
- Contact address:The specific location of your company or service point.
- Contact email:Customers can contact you via email.
- WeChat ID:For adding WeChat friends.
- WeChat QR code: Upload the QR code image directly for easy scanning by users.
- In addition, it also supportsQQ/WhatsApp/Facebook/Twitter/TikTok/Pinterest/LinkedIn/Instagram/YouTubelinks or account information for mainstream social media platforms.
You just need to fill in your latest information in the corresponding input box, and the system will save it properly.
The strength of AnQiCMS lies in its high customizability. If you have specific contact information for your business that is not included in the above list, or if you need some special display content, you can go through theCustom settings parametersAdd functionality to be flexible.
For example, you may need to display a dedicated customer service phone number for a company in a specific region, which is different from the general contact number. You can click to add and set a distinctive “Parameter Namefor exampleAreaServicePhonethen fill in specificParameter valuefor instance010-88889999and add aNoteTo explain its purpose. This "parameter name" will be the key identifier you use to call this information in the website front-end template.In this way, AnQiCMS ensures that the system can adapt to various personalized business needs.
front-end display: flexibly call through template tags
After configuring all contact information in the background, the next step is how to dynamically present this information on the front page of your website.AnQiCMS uses a template engine syntax similar to Django, through specific tags, you can bind background data to any position on the page in a very intuitive and convenient manner.
The core isContact Information TagIt is used in the basic format of{% contact 变量名称 with name="字段名称" %}.
nameParameter: This is the contact information you filled in the background “Contact Settings”field name(such asCellphone,EmailorCustom parameter name(such as the one you addedWhatsApp)
Let's look at some specific examples to see how we can flexibly call this information in the template:
Display contact phone number:The footer or contact us page of a website usually displays a contact phone number. You can insert it into the template file:
<p>联系电话:{% contact with name="Cellphone" %}</p>Display contact email:To facilitate user email contact, you can call the email address like this:
<p>联系邮箱:<a href="mailto:{% contact with name="Email" %}">{% contact with name="Email" %}</a></p>Display WeChat QR code:For contact methods of image type, such as WeChat QR code, you need to refer to it as
imglabel'ssrcan attribute value. Make sure you have uploaded the QR code image on the backend.<img src="{% contact with name="Qrcode" %}" alt="微信二维码" />Display the custom WhatsApp link:If you added a custom in the background
WhatsAppcontact information, and its "parameter name" is exactlyWhatsAppThen you can call it in the template like this:<p>WhatsApp:<a href="https://wa.me/{% contact with name="WhatsApp" %}" target="_blank">点击联系</a></p>This has been used
https://wa.me/Prefix, assume your WhatsApp parameter value is a phone number, so you can generate a clickable WhatsApp chat link.
These{% contact ... %}The tag can be flexibly placed in any template file of the website, whether it is the header, footer, sidebar, or an independent 'Contact Us' page.This design ensures that your contact information remains highly consistent, and after a single update in the background, the entire site can be synchronized, greatly enhancing operational efficiency, and ensuring the accuracy and timeliness of the information.
Through the intuitive backend settings and powerful template tag system provided by AnQiCMS, dynamic management and display of the website's contact information have become simpler than ever before.It not only reduces the trouble and risk of manually modifying code, but also gives you complete control over the display of website content, making your website operation more efficient and flexible.
Frequently Asked Questions (FAQ)
1. I added a new contact method (such as a Telegram link) in the background 'Contact Settings', but it didn't show on the website frontend. What could be the reason?
This is usually because you haven't added the corresponding tag in the website template file to call it. The 'Contact Information Settings' on the back end only stores information, and you still need to add it in the template (such as the footer templatepartial/footer.htmlor contact us pagepage/contact.htmlUse it in{% contact with name="您自定义的参数名" %}such as this.