How to display contact information on the page, such as phone number, address, etc.

Calendar 👁️ 93

The website's contact information is an important part in building user trust and providing convenient services.Whether displaying a simple phone number at the bottom of the website or providing detailed addresses and social media links on the "Contact Us" page, Anqi CMS offers a flexible and efficient way to manage and present these key information.This article will deeply explore how to set up and display the various contact methods on your website in Anqi CMS, ensuring that your customers can easily find you.

Backend management: Set your contact information uniformly

In Anqi CMS, all websites' common contact information is centralized for management.You just need to enter the background management interface, find the "Contact Information Settings" option under the "Background Settings" menu.

Here, you will see a series of preset common contact information fields, such as 'Contact person', 'Phone number', 'Address', 'Email', 'WeChat ID', and 'WeChat QR code' and so on.These fields cover most of the basic contact requirements for most corporate or personal websites.You just need to fill in your information in the corresponding input box, and the system will automatically save these contents and prepare for the call of the front-end page.

The strength of AnQi CMS also lies in its flexibility. If the preset fields cannot fully meet your needs, for example, if you need to display the company QQ number, WhatsApp link, or phone number of a specific department, the system also provides the function of "custom setting parameters".Here, you can easily add new parameters, name them (the 'parameter name' will serve as the identifier called in the template, it is recommended to use English or Pinyin to improve readability), and fill in specific values.For example, you can set a parameter named "WhatsApp" with your WhatsApp number or link.This can be extended through simple customization even if the contact method is not in the default list.

front-end display: flexibly call through template tags

AnQi CMS uses an intuitive template tag system to make it easy to display this contact information on the website front end. The core calling tag is{% contact %}. This label can help you accurately display the contact information set in the background to the user.

The most direct way to use it is to{% contact with name="字段名称" %}. Here,字段名称This is the parameter name you see in the background "Contact Information Settings" or customize. For example, to display the company's phone number, you can write the template code like this:

<!-- 显示联系电话 -->
<p>联系电话:{% contact with name="Cellphone" %}</p>

Similarly, if you need to display the company's detailed address or contact email, justnamechange the attribute value toAddressorEmailand it is done:

<!-- 显示公司地址 -->
<p>公司地址:{% contact with name="Address" %}</p>

<!-- 显示联系邮箱 -->
<p>邮箱:<a href="mailto:{% contact with name="Email" %}">{% contact with name="Email" %}</a></p>

for images like WeChat QR codes,{% contact %}The tag will directly return the URL path of the image file. You need to embed it into<img>the tag to display correctly:

<!-- 显示微信二维码 -->
<p>微信二维码:<img src="{% contact with name="Qrcode" %}" alt="微信二维码"></p>

If you add a custom parameter in the background, such as a parameter named "WhatsApp", calling it in the template is also simple:

<!-- 显示 WhatsApp 联系方式 -->
<p>WhatsApp:{% contact with name="WhatsApp" %}</p>

To make the template code cleaner and easier to maintain, you can alsocontactAssign the output of a tag to a variable and then use this variable elsewhere in the template. This method is particularly suitable for situations where you need to refer to a contact information multiple times on the same page:

{% contact companyPhone with name="Cellphone" %}
<p>拨打热线:<a href="tel:{{companyPhone}}">{{companyPhone}}</a></p>

By this method, you can directly convert phone numbers into clickable dialing links, enhancing the mobile user experience.

These contact methods can be flexibly placed anywhere on the website.The most common and recommended practice is to display your contact information in the header (Header), footer (Footer), a dedicated "Contact Us" page, or sidebar, etc., to ensure that users can easily find your contact information no matter where they browse.

Tips for improving user experience and SEO.

When displaying contact information, in addition to ensuring that the information is accurate and error-free, some tips can also significantly improve user experience and website search engine optimization (SEO) effectiveness:

  1. Maintain consistency:Ensure that all contact information on the website is kept up to date and consistent. Inconsistent information may reduce the user's trust in the website and may also affect the search engine's judgment.
  2. Improve accessibility:For phone numbers, usetel:the link of the protocol (e.g.,<a href="tel:1234567890">1234567890</a>) It is convenient for mobile device users to click and make a direct call. For addresses, consider adding a link to map services for easy navigation.
  3. Beneficial for local SEO:Displaying address, phone numbers, and other information clearly and structurally on your website helps search engines better understand your local business, which may improve your local search rankings and attract more potential customers nearby.

AnQi CMS provides high flexibility and convenience in the management and display of contact information.By simple backend configuration and template tags, you can easily display important contact information to users, effectively improving the website's user experience and business conversion rate.


Frequently Asked Questions (FAQ)

Q1: If I need to display multiple phone numbers (such as the sales department, customer service department), can Anqi CMS achieve this?

A1: It can be fully realized. You can add multiple phone numbers by using the "Custom Settings Parameters" feature on the "Contact Information Settings" page in the Anqi CMS backend.For example, you can add a "parameter name" ofSalesPhoneThe parameter value is the sales department phone number; add another one.ServicePhoneThe parameter value is the customer service department phone number. In the template, use separately.{% contact with name="SalesPhone" %}and{% contact with name="ServicePhone" %}to call it.

Q2: Can a specific page on the website (such as a product details page) display independent contact information instead of the site-wide one?

A2: Of Security CMScontactThe tag is mainly used to call the general contact information of the entire site. If a specific page needs independent contact information, you can consider adding a custom field (such as) in the 'Content Management' -> 'Content Model' for the corresponding model (such as the 'Product Model')ProductContactPhoneEnter the exclusive details when editing the product.

Related articles

How to retrieve and display the system configuration information of the website in the template?

In website operation, we often need to display some global website information, such as the website name, Logo, filing number, copyright statement, as well as custom contact information or social media links.This information, if directly hardcoded in the template, would require searching and updating each page whenever a modification is needed, which is time-consuming and prone to errors.The AnQi CMS provides a very powerful and convenient template tag —— the `system` tag, which allows these system configuration information to be dynamically obtained and displayed in the template, greatly enhancing the maintainability and operational efficiency of the website.###

2025-11-08

How to customize a dedicated content display template for a specific document ID or category ID?

In website operations, we often encounter such needs: a particular product display page needs a unique layout to emphasize its features, or an important event special page needs special design to attract users, or a "About Us" single-page site wants to show a different brand character.Anqi CMS provides us with a flexible way, allowing us to customize exclusive display templates for these unique content needs, thus greatly enhancing the visual appeal and user experience of the website.The Anqi CMS template system has adopted the Django template engine syntax

2025-11-08

What is the default template file name for the document detail page and list page?

When using AnQiCMS for website building and content management, understanding the naming conventions of its template files is crucial for customizing and optimizing the website appearance.AnQi CMS to simplify template management, provides a flexible and default recognition naming convention, allowing website developers and operators to work more efficiently.First, all template files should be unified to use the `.html` suffix and placed in the `/template` folder under the website root directory.the styles and JavaScript scripts used in the template

2025-11-08

How can we design and display a separate content template for mobile devices to optimize the mobile user experience?

It is crucial to optimize the mobile user experience for modern website operations, and designing content templates specifically for mobile devices is an efficient way to achieve this goal.AnQi CMS provides a flexible mechanism, allowing users to provide the most suitable browsing experience for different terminals according to their needs.### Understanding AnQi CMS Mobile Template Mode AnQi CMS is designed to meet the diverse mobile adaptation needs and includes three main website modes that determine how content is displayed to mobile users: * **Responsive Template Type**

2025-11-08

How to dynamically display SEO titles, keywords, and descriptions (TDK) on different pages?

In website operation, Search Engine Optimization (SEO) is a key element in enhancing website visibility.Among them, the page title (Title), keywords (Keywords), and description (Description), abbreviated as TDK, play a crucial role.They are not only the primary information that search engines understand the content of the page, but also an important factor in attracting users to click.In AnQiCMS (AnQiCMS), we can easily implement the dynamic display of TDK, allowing each page of the website to have appropriate and attractive TDK information

2025-11-08

How to build and display a multi-level navigation menu for a website?

Website navigation, like the skeleton and compass of a website, it guides visitors to explore the website content, and is the core of user experience and information architecture.A clear and accessible navigation menu that not only helps users find the information they need quickly, but is also crucial for search engine optimization (SEO).AnQiCMS (AnQiCMS) is well-versed in this, providing powerful and flexible navigation management features that allow you to easily build and display multi-level navigation menus.Next, we will delve deeper into how to build and display your website navigation step by step in Anqi CMS.--- ### One

2025-11-08

How to display breadcrumb navigation on the page to enhance users' understanding of the content structure?

When we browse websites, we often see a line of text at the top or above the content area, clearly indicating the position of the current page within the overall website structure, like "Home > Product Center > Some Product Category > Some Product Detail" and so on.This is what we commonly refer to as 'Breadcrumb Navigation'.It can not only help users quickly understand the content hierarchy of the website, avoid getting lost, but also play an important role in user experience and search engine optimization (SEO).Aq CMS fully understands the importance of breadcrumb navigation

2025-11-08

How to use conditional judgment logic in a template to control the display and hiding of content?

In the presentation of website content, we often need to decide based on different situations which information should be displayed to visitors and which should be temporarily hidden.AnQiCMS (AnQiCMS) provides flexible template conditional judgment logic, making content display and hide intuitive and efficient.By these judgments, you can easily implement personalized page layouts, content display under permission control, and adjustment of page elements based on data status, which greatly enhances the dynamicity and user experience of the website.The Anqi CMS template system uses a syntax similar to the Django template engine

2025-11-08