How to display the contact information, phone number, address, and other contact methods set on the website?

Calendar 👁️ 93

In modern website operation, clearly displaying the company's contact information is a key link in establishing trust and facilitating communication with users.AnQiCMS (AnQiCMS) understands this and provides an intuitive and flexible backend setting, allowing you to easily manage and display the contact information, phone numbers, addresses, and other information of the website.This article will introduce how to set and display these important contact information in Anqi CMS.

1. Configure your contact information in the Anqi CMS backend

All contact information displayed on the website's frontend must first be managed uniformly in the Anqi CMS backend. This ensures consistency and ease of updates.

  1. Enter the contact information settings interface:Log in to your AnQi CMS backend management system. In the left navigation bar, find and click "Backend Settings", then select "Contact Information Settings".
  2. Fill in the default contact information:After entering this interface, you will see a series of preset contact information fields, such as:
    • Contact:Generally fill in your name or the name of the customer service representative, such as 'Manager Li', 'Customer Service Xia An'.
    • Contact Phone:The phone number you want the customer to call.
    • Contact address:The detailed address of your company or physical store.
    • Contact Email:Customer email address for consultation.
    • WeChat ID:Your WeChat ID or public account ID.
    • WeChat QR Code:Upload your WeChat QR code image for easy scanning by users. You just need to fill in the accurate information in the corresponding input box.
  3. Expand using custom settings parameters:In addition to the above default fields, Anqi CMS also provides a powerful "custom setting parameter" function.If you have other contact information to display, such as WhatsApp, Facebook homepage links, Twitter accounts, etc., you can add them here.
    • Click "Add Custom Parameter", you can specify the "Parameter Name" (for exampleWhatsApp/Facebook), this name will be used for subsequent calls in the template.
    • Enter the corresponding contact information or link in the "Parameter Value".
    • The "Note" field can help you record the use of the parameter for future management.

After completing the information entry, remember to click save so that this data can be called in the front-end template.

Second, display the contact information in the website front-end template.

The Anqi CMS uses a simple template tag syntax, allowing you to display the contact information set in the background on various positions of the website without writing complex code.

To display contact information on the front end of the website, you will mainly use a core template tag:{% contact %}This tag allows you to retrieve the corresponding value based on the "parameter name" set in the background.

The basic usage is:{% contact with name="字段名称" %}.

Here are some common contact methods used in templates:

  • Display contact name:
    
    <span>联系人:{% contact with name="UserName" %}</span>
    
  • Display contact phone number:
    
    <span>电话:<a href="tel:{% contact with name="Cellphone" %}" rel="nofollow">{% contact with name="Cellphone" %}</a></span>
    
    Here, we not only display the phone number, but also throughtel:The protocol makes it clickable for dialing and addsrel="nofollow"Property.
  • Display contact address:
    
    <span>地址:{% contact with name="Address" %}</span>
    
  • Display contact email:
    
    <span>邮箱:<a href="mailto:{% contact with name="Email" %}">{% contact with name="Email" %}</a></span>
    
  • Display WeChat ID:
    
    <span>微信号:{% contact with name="Wechat" %}</span>
    
  • Display WeChat QR code image:Since the QR code is an image link, to display the image correctly, you need to treat it as<img>label'ssrcProperty value and usually needs to be used|safeFilter to prevent special characters in image links from being escaped and not displayed normally.
    
    <img src="{% contact with name="Qrcode" %}" alt="微信二维码" />
    
    Or, if you want to store the QR code image address in a variable first and then use it:
    
    {% contact qr_code_url with name="Qrcode" %}
    {% if qr_code_url %}
        <img src="{{ qr_code_url }}" alt="微信二维码" />
    {% endif %}
    
  • Display custom contact information (for example, using WhatsApp):If you have added a custom parameter namedWhatsAppin the background, you can call it in the same way:
    
    <span>WhatsApp:{% contact with name="WhatsApp" %}</span>
    

Important reminder:

  • nameThe value of the parameter must match the field name you entered in the "Contact Information Settings" on the backend (whether it is a default field or a custom parameter name).
  • For image paths, HTML content, etc., it is recommended to use in conjunction with|safea filter to ensure that the content can be correctly parsed and displayed by the browser.
  • If you have enabled the multi-site feature and want to call contact information from other sites, you can{% contact %}the tag withsiteIdparameters, for example{% contact with name="Cellphone" siteId="2" %}.

3. Integrate contact information into the website design

Contact information is usually placed in several fixed positions on the website to ensure that users can find it at any time:

  • Website Header (Header):You can display the contact phone number or email address near the navigation bar or at the top of the page to facilitate quick contact.
  • Website Footer:This is a common location to display complete contact information (including address, phone, email, social media links, etc.).
  • Contact us page: A dedicated contact page can display all detailed contact information, and may include maps, online message forms, etc.
  • Sidebar or floating button:On some websites, you may also see floating customer service buttons or sidebars, providing a quick contact channel.

By following these steps, you can flexibly and efficiently manage and display your website's contact information in Anqi CMS, providing a better access experience for users.


Frequently Asked Questions (FAQ)

  1. How to call a custom contact method (e.g., WhatsApp) on the front end?You need to add custom setting parameters by clicking on the "Backend Settings" -> "Contact Information Settings" page in the Anqi CMS backend. For example, enter the parameter name asWhatsApp,Please enter the corresponding WhatsApp number or link. Then you can use it in the front-end template,{% contact with name="WhatsApp" %}to display its value.
  2. If my website supports multilingual, will the contact information follow the language change?The contact information settings of AnqiCMS are at the site level, not at the language level.This means that the contact, phone number, address, and other information you set will be fixed content and will not be automatically translated or changed due to the language switch of the website.If you need to provide different contact information for different language versions, it is recommended to use the multi-site feature, create an independent site for each language version, and set different contact information in the backend of each site.
  3. Where can I see the contact information after it is set?You can call this contact information from any position on the website front-end template.They are usually placed at the top, bottom, or a dedicated "Contact Us" page of a website.After modifying or adding contact information, you can view the updated content by accessing the website's front-end page (you may need to refresh the browser cache).

Related articles

How to display breadcrumb navigation on a page to improve user experience?

In modern web design, breadcrumb navigation has become a standard element to enhance user experience and website usability.It acts as a guide for users to advance, clearly showing the user's current position in the website's hierarchy structure and providing a convenient way to return to the parent page.For websites built using AnQiCMS, integrating breadcrumb navigation can greatly facilitate visitors and also play a positive role in search engine optimization (SEO).Why is breadcrumbs navigation so important? Imagine

2025-11-09

How to display the website filing number and copyright information in the footer?

In website operation, the website footer usually contains important information, such as filing number and copyright statement.This information is not only a manifestation of the website's compliance, but also a window for displaying the website's professionalism.AnQiCMS provides a convenient way to manage and display this information.We will introduce in detail how to display the filing number and copyright information in the footer of the AnQiCMS website.

2025-11-09

How to display the website name and logo in the template?

The website's name and logo, like a person's name and face, are an indispensable symbol.They are not only the core of the brand image, but also the key to improving the professionalism of the website, enhancing user trust, and making it easy to remember.In AnQiCMS, elegantly present these important identification elements in the website template, simpler and more flexible than you imagine.Understanding the basic settings of AnQiCMS website In AnQiCMS, the basic information of the website such as the name and Logo is concentrated in the background "Global Function Settings".You can log in to the back end and navigate to

2025-11-09

How to dynamically set the page title (Title), keywords (Keywords) and description (Description)?

In website operation, the page title (Title), keywords (Keywords), and description (Description) are the foundation of Search Engine Optimization (SEO).They not only convey the core information of the page content to search engines, but also directly affect the click-through rate of users on the search results page.AnQiCMS (AnQiCMS) fully understands its importance and provides a flexible and powerful mechanism that allows users to dynamically and accurately set these SEO elements based on the content of different pages.This article will discuss in detail how to be efficient in AnQiCMS

2025-11-09

How to display the WeChat QR code of the website or customize social media links?

In today's digital marketing era, the close integration of websites and social media is crucial for enhancing user interaction and brand influence.AnQiCMS as an efficient content management system fully considers the user's needs and provides a flexible and convenient way to display the WeChat QR code of the website and various custom social media links.In order to make it convenient for users to add WeChat consultation or guide them to visit your Facebook, Twitter, and other platforms, AnQiCMS can help you easily achieve this, making your website a bridge connecting users.### Step 1

2025-11-09

How to display the user comment list on the article detail page?

User comments are an indispensable part of the website content ecosystem. They not only effectively enhance content interactivity and user engagement, but also bring a richer UGC (User Generated Content) to the website, helping with SEO optimization and fostering a community atmosphere.AnQiCMS as a powerful content management system has fully considered this need, providing you with a flexible and efficient way to integrate the user comment list into your article detail page.

2025-11-09

How to integrate the comment submission form and handle user comments?

In modern website operations, user comments are an important way to enhance the interactivity and activity of content.AnQiCMS (AnQiCMS) offers a powerful and flexible comment feature, allowing you to easily integrate a comment submission form on your website and effectively manage user comments.Next, we will explore how to achieve this goal in AnQiCMS together.

2025-11-09

How to implement the like function for comments?

User interaction is an important manifestation of website vitality, which can significantly enhance the attractiveness and user stickiness of content.AnQi CMS is a powerful and highly customizable content management system that provides a rich set of features to enhance user engagement.Among them, the comment function is the core battlefield of user communication, and adding a like function to the comments can undoubtedly further stimulate community vitality and allow users to give more direct and positive feedback to high-quality comments.### Overview of AnQi CMS Comment Function AnQi CMS is built-in with a comprehensive comment management system, allowing website visitors to easily comment on articles

2025-11-09