How to configure and display the contact information of the AnQiCMS website, such as phone number, address, and social media?

Calendar 👁️ 68

The contact information of the website is the key to connecting with users and providing support.AnQiCMS provides an intuitive and flexible way to manage and display this important information, whether it is a phone number, address, or various social media platform links, it can be easily realized.

Configure the website contact information in the background

To configure the website contact information, you can first log in to the Anqi CMS backend management interface.In the left navigation bar, find and click "Backend Settings", then select "Contact Information Settings".Here is a collection of all the contact information you may need to display.

The system defaults to some common contact fields, such as:

  • Contact:It is usually the main contact person's name for your website or company.
  • Contact Phone:The user's consultation phone number, which can be dialed directly by clicking.
  • Contact address:Your company or entity address, convenient for user navigation.
  • Contact Email:Email address for user communication.
  • WeChat ID/QR code:These two methods are common communication channels for domestic users.

You just need to fill in the information in the corresponding input box, then save it. This information will take effect immediately within the system and be ready for the front-end call.

Add more social media and other custom contact information

The strength of AnQi CMS lies in its customizability. If you need to display social media platforms other than the default fields, such as WhatsApp, Facebook, Twitter, Instagram, LinkedIn, or YouTube, or any other contact information you consider important, you can use the "Custom Setting Parameters" feature.

Under the bottom of the "Contact Information Settings" page, you will see the option to add custom parameters. There are three key items that need to be filled out:

  1. Parameter name:This is the name provided for the template, it is recommended to use English, the system will automatically convert it to camel case (for example, inputwhatsapp, the system will recognize asWhatsApp). This name will be the key for referencing this information on the website front-end.
  2. Parameter value:The specific content represented by the parameter name, such as your WhatsApp account, Facebook homepage link, or a link to an online customer service system.
  3. Note:This is an internal identifier to remind you of the purpose of this custom parameter, it will not be displayed on the front end.

In this way, you can infinitely expand the contact information of the website according to your business needs, making it more comprehensive and professional.

Display contact information on the front end of the website

After configuring the background information, the next step is to display these contact methods on various pages of the website.A security CMS makes this process very easy through simple template tags.You need to use in the website template file{% contact %}Tags to retrieve this information.

The website template files are usually located/templateIn the specific topic folder under the catalog, for example, header (header), footer, or the 'Contact Us' page, etc.

Standard contact information call

To display the default preset contact information, you can use{% contact with name="字段名称" %}format. For example:

  • To display the contact phone number:{% contact with name="Cellphone" %}
  • To display the company address:{% contact with name="Address" %}
  • To display the contact email:{% contact with name="Email" %}

These labels will directly output the corresponding content you enter in the background.

Display social media links and custom information

Of Security CMS{% contact %}The tag also built-in support for various social media platforms. This means that even if not added through "custom settings parameters", as long as you fill in these social media accounts or links in the standard fields in the background, you can directly call them:

  • {% contact with name="Facebook" %}
  • {% contact with name="Twitter" %}
  • {% contact with name="WhatsApp" %}
  • wait, almost covers all mainstream social media.

The calling method is exactly the same for the contact information you add through "custom settings parameters". Just need tonameSet the attribute to your custom parameter name. For example, if you have customized a namedSkypeIDparameter:

  • {% contact with name="SkypeID" %}

Especially, if you need to display a WeChat QR code image, for example:<img src="{% contact with name="Qrcode" %}" alt="微信二维码" />It should be noted that when calling image URLs and other URL-like content, they are usually used directly assrcthe value of the attribute.

Integrated display example

Assuming you want to display the contact phone number, address, email, and Facebook homepage link uniformly in the footer of the website (assuming Facebook is added through custom parameters):

<div class="footer-contact">
    <p>电话: <a href="tel:{% contact with name="Cellphone" %}" rel="nofollow">{% contact with name="Cellphone" %}</a></p>
    <p>地址: {% contact with name="Address" %}</p>
    <p>邮箱: <a href="mailto:{% contact with name="Email" %}" rel="nofollow">{% contact with name="Email" %}</a></p>
    <p>关注我们: <a href="{% contact with name="Facebook" %}" target="_blank" rel="noopener noreferrer">Facebook</a></p>
</div>

In this way, you can flexibly display the required contact information at different locations on the website, and ensure that all information comes from the unified management of the background, which is convenient for subsequent updates and maintenance.

Frequently Asked Questions (FAQ)

1. I updated my contact information in the background, why doesn't the website front end display the changes immediately?The AnQi CMS usually uses caching to improve website access speed.After you update the background information, you may need to manually clear the website cache, or wait until the automatic cache update cycle ends, so that the new information can be displayed on the front end.You can find the 'Clear Cache' option in the upper right corner of the background management interface to clear manually.

2. Can I directly display images or HTML snippets as contact information? For example, customize a social media button with an icon?Yes, you can completely. In the background "Contact Information Settings", when you add custom parameters and fill in the "Parameter Value", you can directly input an HTML code snippet, such as containing<img>The icon of the label or the complete HTML structure of the button. Then, when calling it on the front end, use{% contact with name="您的自定义参数名" %}and may need to be配合|safefor example, a filter (such as{{ contactInfo|safe }})to ensure that HTML code is correctly parsed and not escaped when output.

How to display contact information with different styles or layouts on different pages (such as the home page and the "Contact Us" page)?The Anqi CMS template system is very flexible. You can use different template files such asindex.htmlandcontact.htmlWrite the HTML structure and style for the contact information. Then, use the same template files.{% contact %}Label to retrieve contact information from the background configuration. In this way, the display content on the front end will remain consistent regardless of how the background information is updated, but the appearance can be different according to the template design.

Related articles

How to display different content and manage interfaces for multiple sites in the AnQiCMS website?

AnQiCMS, with its powerful multi-site management functions, provides an efficient and flexible solution for operators with multiple brands, sub-sites, or content branches.It allows you to easily create, manage, and display multiple independently operated websites under the same core system, greatly enhancing the efficiency of content operation.

2025-11-08

How to use the template inheritance and reference feature of AnQiCMS to build reusable display modules?

When using AnQiCMS to build a website, we often encounter such situations: each page of the website has common header navigation, footer information, or some modules (such as sidebars, article recommendation lists) need to be displayed in multiple places, but the content or style may be slightly different.If you copy and paste this code every time, not only is it inefficient, but also once it needs to be modified, you have to adjust it one by one on all related pages, which is very easy to make mistakes and difficult to maintain.

2025-11-08

How to define and use variables in AnQiCMS to display data flexibly in templates?

AnQiCMS (AnQiCMS) is an efficient and flexible content management system, whose powerful template function is the key to building a personalized website.In templates, defining and using variables flexibly allows us to easily handle and display various types of data, whether it's article titles, categorization information, or custom field content. All of this can be dynamically called through variables, making the website full of vitality.We will delve deeper into how to define, obtain, and use variables in AnQiCMS templates, helping everyone build and maintain websites more efficiently.

2025-11-08

How to format a timestamp in AnQiCMS template and display it in a specified date format?

In AnQiCMS template, processing timestamps and displaying them in a specific date format is a common requirement in content operation.No matter whether you need to display the publication time of the article or the update date of the product, understanding how to flexibly format time will greatly enhance the expressiveness of the website content.AnQiCMS provides simple and powerful template tags, making this process easy and convenient.

2025-11-08

How to display the details and list of a custom single page in AnQiCMS?

In AnQiCMS, the Single Page (Page) feature provides the website with the powerful ability to display independent and fixed content, such as 'About Us', 'Contact Information', 'Company Profile', and other pages.These pages usually do not belong to a specific category, but exist independently, carrying important corporate information or brand stories.Efficiently create, manage, and flexibly display the details and lists of these single pages on the website, which is an indispensable part of content operation.

2025-11-08

How to display the banner image list on AnQiCMS template?

The visual elements of a website are crucial for attracting visitors and conveying brand information, and the Banner image list is one of its core components.AnQiCMS as a powerful content management system provides a flexible way to display these banner images on your website template, whether it be for the homepage slideshow, category page feature images, or single-page promotional images, all can be easily realized through concise template tags.

2025-11-08

How to display the category list in AnQiCMS and support multi-level nested display?

The website's category navigation is the foundation of user experience and information architecture.A clear and easy-to-navigate category list, especially one that can support multi-level nesting, can greatly improve the efficiency of users in finding information and optimize the search engine's understanding of the website structure.AnQiCMS provides powerful and flexible template tags to easily achieve this requirement. ### AnQiCMS Category Management Basics In the AnQiCMS backend, you can create and organize your website categories under the "Content Management" module and "Document Category".

2025-11-08

How to display detailed information of a specific category in AnQiCMS, including its introduction and Banner image?

In AnQiCMS, the category page is not just a simple list of content, but also an important part of the website's information architecture, and a key entry point to display specific themes and guide users to further browsing.A well-designed category page that not only enhances user experience but also effectively optimizes search engine rankings.This article will provide a detailed introduction on how to flexibly display specific category details in AnQiCMS, including its introduction and beautiful Banner images.

2025-11-08