How to conveniently display the company's contact phone number and address with the `contact` tag?

Calendar 81

In website operation, clearly and conveniently displaying the company's contact information is a key link to enhance user trust and promote business communication.Whether it is seeking cooperation, providing customer support, or simply to let visitors understand where the company is located, contact information plays a vital role.AnQiCMS knows this very well and provides us with a very convenient way to manage and display this information through its powerful template tag system.

Today, let's delve into the AnQiCMS we have been discussing.contactThe cleverness of the label, see how it helps us easily display the company's contact information and address on the website.


Firstly, where does the contact information come from? From the unified management backend.

All contact information that needs to be displayed on the website front-end must be unifiedly set in the AnQiCMS background.This centralized management approach means that we only need to update the information in one place, and all the places on the website that call this information will be synchronized updated, greatly improving operational efficiency and avoiding the trouble of manually modifying multiple places.

To make these settings, you can enter the AnQiCMS backend management interface, find the left menu item of“Background Settings”and then clickthe "Contact Information Settings".

After entering this page, you will see a series of preset common contact information fields, such as:

  • Contact person (such as "Mr. Wang")
  • Contact phone number
  • Contact address
  • Contact email
  • WeChat ID
  • WeChat QR code image

These are the most common contact information on the website, usually sufficient to meet daily needs. But AnQiCMS is powerful in that, if these default fields cannot fully meet your personalized needs, you can also easily addCustom settings parameters.For example, you may need to display a WhatsApp contact or a direct line phone number for a specific department.WhatsApporCustomerServicePhoneFill in specific information in the "Parameter Value" and briefly describe its purpose in the "Notes" field, save it after use.This flexibility ensures that your contact information can be accurately displayed in any business scenario.


How to display on the website?contactConvenient application of tags

Once the backend is set up, the next step is how to call and display this information on the website page. AnQiCMS provides a very intuitive and easy-to-use template tag.contact.

contactThe basic usage of tags is{% contact 变量名称 with name="字段名称" %}.

There are several key points to understand:

  • 字段名称: These are the predefined field names you see in the background "Contact Settings" (such asCellphone/Address/Emailor you create your own custom parameter name (such asWhatsApp). It is case-sensitive, please make sure it matches the backend settings.
  • 变量名称(Optional): You can choose to assign the contact information to a variable (such as{% contact myPhone with name="Cellphone" %}), so that you can access it in subsequent code by{{ myPhone }}Reference it to perform more flexible operations, such as adding styles or making logical judgments. If complex processing is not required, it can also be omitted.变量名称The tag will directly output the corresponding value, for example,{{ contact with name="Cellphone" }}.

Let's look at some common examples to see how to use it:

Display the company's contact information

Suppose you want to display the company's contact information in the footer of the website or on the 'Contact Us' page.

The simple direct output method is:

电话:{% contact with name="Cellphone" %}

If you want this phone number to be clickable and dialed directly, enhancing user experience, you can combine it with HTML'stel::

联系电话:<a href="tel:{{ contact with name="Cellphone" }}">{{ contact with name="Cellphone" }}</a>

Displaying the company's address

Similarly, displaying the company address is also very simple:

公司地址:{% contact with name="Address" %}

Embed WeChat QR code image

For contact information like WeChat QR codes that require image display, you can upload the QR code image on the backend and associate it with the "WeChat QR code" field, then throughcontactRetrieve its URL and then embed it into<img>tags:

微信扫码联系:<img src="{% contact with name="Qrcode" %}" alt="微信二维码" />

Call a custom contact method

If you have customized a setting named in the backgroundWhatsAppThe parameter is used to store WhatsApp contact numbers, so when calling it on the front end, you only need to use the parameter name you set:

WhatsApp:<a href="https://wa.me/{{ contact with name="WhatsApp" }}" target="_blank">{{ contact with name="WhatsApp" }}</a>

Application in a multi-site environment

AnQiCMS supports multi-site management, if you are operating multiple brands or sub-sites and need to display contact information of other sub-sites on the main site or a specific page,contactThe tag can also do the job. It supports asiteIdparameter that allows you to specify the site ID to be called.

For example, display the contact address of the child site with ID 2:

子站点联系地址:{% contact with name="Address" siteId="2" %}

Make sure that the relevant information is configured in the "Contact Information Settings" on the child site in the background.


Practical tips and tricks

While usingcontactWhen labeling, there are several tips that can help you better enhance user experience and website effectiveness:

  1. Maintain consistencyIt is recommended to maintain consistency of contact information at multiple key locations on the website (such as the page header, footer, "Contact Us" link in the navigation bar, and the independent contact page).The centralized management feature of AnQiCMS makes this very simple, as long as the background data is correct, the front-end call will always be consistent.
  2. Optimize interactive experience:The phone number and email address should be set as clickable links (usingtel:andmailto:Prefix), so visitors can directly click to make a call or send an email, saving the trouble of manually copying and pasting, especially on mobile devices, this convenience is particularly important.
  3. Consider responsive designIf your website uses responsive design, make sure that the contact information is displayed clearly and legibly on different device sizes, and that the clickable link area is large enough for easy touch.
  4. Structured data (SEO friendly): AlthoughcontactThe tag itself is used for page display, but you can also consider making this key contact information (such as address, phone) structured data (such as Schema.org'sLocalBusinessEmbed the type into the page to help search engines better understand your company information, which helps with local SEO optimization.

AnQiCMS'contactThe label not only simplifies the management of company contact information, but also provides a flexible calling method, whether it is standard information or customized needs, it can easily meet the requirements.By reasonable use, your website can more efficiently connect with visitors and improve business conversion.


Frequently Asked Questions (FAQ)

1. How to add a custom contact method in the background, such as 'Complaint Phone'?Answer: In the AnQiCMS background, go into“Backstage Settings”->“Contact Information Settings”Page. Find it at the bottom of the page"Custom Setting Parameters"Area, click to add a new parameter."Parameter name"Enter "ComplaintPhone" (or any name you like) in“Parameter value”Fill in the specific complaint phone number in"Remarks"Write in the

Related articles

How to dynamically display the website filing number and copyright information through the `system` tag in the footer?

When operating a website, the filing number and copyright information are an indispensable part of the website. They are not only the symbol of the legitimate operation of the website but also reflect the respect for original content.For AnQiCMS users, managing this information and displaying it dynamically through the footer is a convenient and efficient operation.AnQiCMS provides an intuitive backend setting and flexible template tags, allowing you to easily meet this requirement, saving the trouble of manually modifying the code on each page.

2025-11-08

How to use the `system` tag to display the website name and logo on the page?

## Easily Solved: How to Gracefully Display Your Website Name and Logo on AnQiCMS Page It is crucial to display brand identity when operating a website.The website name and logo are not only the key elements for visitors to identify your brand, but also the foundation for enhancing the professionalism and trust of the website.AnQiCMS provides a直观而强大的template tag system that allows you to easily call and display these core information on any page of the website.Among them, the `system` tag is specifically designed to obtain this type of global site configuration. Next

2025-11-08

How to implement the reuse of the common part of AnQiCMS templates (such as headers and footers)?

In AnQiCMS, efficient website content management is inseparable from a flexible and easy-to-maintain template system.You may encounter such a need when creating a template: headers, footers, navigation bars, and other common elements need to appear on every page of the website.If repeating the same code on each page is not only time-consuming and labor-intensive, but also modifying it in the future will cause a domino effect.Luckyly, AnQiCMS leverages the powerful functions of the Django template engine to provide an elegant solution, allowing these common parts to be easily reused.### Core Foundation

2025-11-08

How to flexibly specify independent display templates for single-page content?

AnQiCMS (AnQiCMS) provides excellent flexibility in website content management, especially in the display of single-page content, allowing us to specify completely independent display templates for different single pages.This means that your "About Us" page can have a unique layout and design, distinctly different from pages like "Contact Us" or "Terms of Service", without modifying the overall template structure of the website.This fine-grained control brings great freedom to the content presentation of the website.Many times, certain pages on our website carry important brand image displays

2025-11-08

How to dynamically generate the page's Title, Keywords, and Description (TDK) to optimize SEO display?

In website operation, Title (title), Keywords (keywords) and Description (description) - abbreviated as TDK, are the core elements of search engine optimization (SEO).They directly affect the display of the website on the search engine results page (SERP), thereby determining the click-through rate and traffic of the website.For a content-rich website, manually setting TDK for each page is neither realistic nor efficient.

2025-11-08

How to use the `navList` tag to build a website navigation menu with secondary dropdown?

Build a clear and easy-to-use website navigation menu is an important link to improve user experience and website professionalism.In AnQi CMS, we can take advantage of the powerful `navList` tag to easily implement a navigation menu with secondary dropdown support, making the website content well-structured and convenient for visitors to browse.Next, we will explore how to use the `navList` tag, from backend configuration to frontend template rendering, step by step to create a complete second-level dropdown navigation.

2025-11-08

How to automatically generate breadcrumb navigation using the `breadcrumb` tag and customize the display text on the homepage?

The user experience of a website largely depends on the convenience and clarity of navigation.When the visitor delves into the website content, a friendly 'Breadcrumb Navigation' can clearly indicate the current position and provide a quick path to return to the upper page.AnQiCMS is well-versed in this, providing a powerful and easy-to-use `breadcrumb` tag that allows website administrators to automatically generate paths without complex coding, and even to flexibly customize the display text on the homepage.

2025-11-08

How to use the `categoryList` tag to display the list of articles/products categories on the homepage or sidebar?

When building and optimizing a website, a clear navigation structure is crucial for user experience and search engine optimization.AnQiCMS (AnQiCMS) provides us with powerful template tags, among which the `categoryList` tag is a core tool used to flexibly display article or product category lists on the homepage or sidebar of the website.With it, we can easily organize the content of the website neatly, allowing visitors to find the information they are interested in at a glance.Why is the category list so important? Imagine when visitors come to a rich content website

2025-11-08