In the digital age, the contact information on a website is not just a string of information, but also a bridge for communication with customers and the foundation for building brand trust.For many website operators who use AnQiCMS, how to efficiently and flexibly display these key information on the website front-end, especially the detailed contact address, is a common and important issue.Luckyly, AnQiCMS relies on its intuitive and powerful template tag system, making everything exceptionally simple.
The 'Contact Information Label' of AnQi CMS: Make information accessible at your fingertips
AnQiCMS knows the importance of content display flexibility for website operations, therefore it has built a special module for obtaining contact information,contactThe tag's design philosophy is simple and powerful, allowing you to easily retrieve and render various contact information from the background, whether it is contact names, phone numbers, email addresses, or the detailed address we are focusing on today, all can be efficiently retrieved through consistent syntax.
contactThe basic usage of tags is very intuitive:{% contact 变量名称 with name="字段名称" %}
The variable name is optional. If you want to store the obtained data in a temporary variable for subsequent processing, you can specify it.name="字段名称"It is the core, it tells the system which specific contact information you want to obtain.
Behind the scenes: the source of contact information.
All these contact information is concentrated in the AnQiCMS backend“Background Settings”ofthe "Contact Information Settings"Module is unified management. You can conveniently fill in standard fields such as "contact person", "contact phone", "contact address", "contact email", "WeChat ID", "WeChat QR code", "QQ", and links to mainstream social media (such as WhatsApp, Facebook, Twitter, Tiktok, Pinterest, Linkedin, Instagram, Youtube) here.These fields are the basis for displaying contact information on the website, once entered in the background, they become data sources that can be called at any time by the front-end template.
Moreover, AnQiCMS also supportsCustom settings parametersThis means that if your business has special requirements, such as displaying a specific business consultation hotline or an email address for a specific department, it can be flexibly expanded by adding custom parameters.The way these custom parameters are called is exactly the same as built-in fields, greatly enhancing the adaptability of the template, allowing unrestricted display of your website information.
How can you elegantly obtain and display detailed contact information?
To get the detailed contact address of the website, you just need to use it in the AnQiCMS template filecontacttags, and specifynameparameters forAddressYou may wish to display the specific address of the company on the footer or "Contact Us" page:
{# 直接输出详细联系地址 #}
<div>公司地址:{% contact with name="Address" %}</div>
{# 将地址存储到变量中再输出,更灵活 #}
{% contact siteAddress with name="Address" %}
<div>我们的详细地址是:{{ siteAddress }}</div>
In this way, no matter how the contact address on the back-end is updated, the front-end page will automatically synchronize and display the latest information, thus avoiding the trouble of manually modifying the template.
Other common contact information retrieval and display
Of course, besides the detailed address,contactTags can also help you easily get other important contact information. Imagine that your website visitors want to contact you by phone or email, and you can display it like this:
Contact Phone (Cellphone):
<div>联系电话:<a href="tel:{% contact with name="Cellphone" %}">{% contact with name="Cellphone" %}</a></div>Contact Email (Email):
<div>商务合作:<a href="mailto:{% contact with name="Email" %}">{% contact with name="Email" %}</a></div>WeChat QR Code (Qrcode):For contact methods of image types, such as WeChat QR codes, AnQiCMS also provides a convenient way to obtain them. You just need to pass the address of the QR code image uploaded on the backend through
name="Qrcode"Retrieve and use it in the<img>tag as follows:{% contact wechatQrcode with name="Qrcode" %} {% if wechatQrcode %} <div class="wechat-qr"> <img src="{{ wechatQrcode }}" alt="微信二维码" /> <p>扫码添加微信</p> </div> {% endif %}Custom parameters:If you have created a custom contact method in the background, such as a named
WhatsAppparameter, then you can also use it in the template.{% contact with name="WhatsApp" %}Easily obtain and display it.<div>WhatsApp:{% contact with name="WhatsApp" %}</div>
Flexible application in multi-site scenarios
For those who operate multiple AnQiCMS sites, if you want to call in a site template on a particular site,other sitescontact information,contactLabels also support asiteIdparameters. By specifying the target site ID, you can flexibly retrieve data across sites, which is particularly practical on the group's official website or in multi-brand management:
{# 获取ID为2的站点的联系地址 #}
<div>兄弟公司地址:{% contact with name="Address" siteId="2" %}</div>
Why clear contact information is crucial?
Efficiently and accurately displaying contact information is not just for the beauty of the website, but also a key factor in improving user experience and search engine optimization.A clear and easily accessible contact method can increase user trust in the website and reduce the bounce rate;At the same time, when search engines crawl well-structured contact information such as addresses and phone numbers, it also helps to improve the visibility and ranking of websites in local search results, which is particularly important for local service-oriented enterprises.
In summary, AnQiCMS'scontactThe tag is a powerful and easy-to-use tool that closely combines the management and display of website contact information, allowing website operators to focus on content creation and business expansion without worrying about complicated code.Use this tag flexibly, and your website will be able to connect with the world in a more professional and convenient way.
Frequently Asked Questions (FAQ)
How to set or modify the website contact address on AnQiCMS backend?You just need to log in to the AnQiCMS backend, navigate to the 'Backend Settings' menu, then click 'Contact Information Settings'. Fill in or modify the contact address, phone number, email information in the corresponding fields, save it, and the front-end page will use it.
contactThe information called by the tag will be automatically updated.In addition to the detailed contact address,
contactWhat types of contact information can the tag obtain?contactThe tag supports retrieving various preset contact information, including contact name (UserName), phone number (Cellphone), email (Email), WeChat number (Wechat), WeChat QR code image address (Qrcode), QQ number (QQ), and links to various social media platforms (such as WhatsApp, Facebook, Twitter, etc).In addition, you can also customize any additional contact methods in the background and call them through their custom 'parameter name'.If my website has multiple language versions, will the contact information label automatically switch languages?
contactThe label itself is used to retrieve the specific values entered in the background "Contact Information Settings"specific valuesIt will not automatically perform language translation. If you operate a multilingual website and each language version needs to display different contact information, it is usually recommended to use AnQiCMS's 'Multi-site Management' feature to set up an independent site for each language version, and configure the contact information of each language for the site