How to obtain and display the contact information configured on the back-end, such as phone numbers, email addresses, WeChat QR codes, and other diversified information?

Calendar 👁️ 57

AnQiCMS (AnQiCMS) is an efficient and flexible content management system that performs well in helping enterprises display their brand image and provide convenient communication channels.For any website, having clear and accessible contact information is the key to building trust with users and promoting cooperation.AnQi CMS deeply understands this, providing a set of intuitive and powerful functions, allowing you to easily manage and display various contact information such as phone numbers, email addresses, and WeChat QR codes.

Back-end configuration: Central management center for contact information

In Anqi CMS, all contact methods can be managed and configured at a unified entry, which greatly simplifies the work of operation personnel. You can navigate toBackend settings-u003eContact information settingsPage, to add, delete, modify, and query the contact information of the website.

Here, Anqi CMS provides a series of commonly used default settings that meet the basic needs of most websites, including:

  • Contact:This is usually the name you want to publish externally, such as 'Manager Zhang'.
  • Contact Phone:This is a phone number that users can dial directly.
  • Contact address:The address of your company or entity.
  • Contact Email:Users can communicate with you via email.
  • WeChat ID:Users can directly add your WeChat for consultation.
  • WeChat QR Code:Upload the corresponding QR code image for easy scanning and addition.

In addition to this basic information, the strength of Anqi CMS lies in its high customizability.If you have other specific contact channels such as WhatsApp, Skype, Telegram, or need to display links to social media such as Facebook, Twitter, LinkedIn, you can flexibly add them through the "Custom Setting Parameters".

When adding custom parameters, you need to set:

  • Parameter name:This is the unique identifier for the front-end template, it is recommended to use English, for exampleWhatsApporFacebookLink.
  • Parameter value:The corresponding contact information or link address.
  • Note:Help you understand the purpose of the parameter description, it will not be displayed on the front end.

In this way, you can ensure that all important contact channels are properly managed and always ready to be displayed on the front desk.

Front-end template call: make contact information omnipresent.

Once the background configuration is complete, the next step is to call and display this information on the website front-end template. AnQi CMS provides a concise and clear interface.contactTemplate tags make this process extremely simple.

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

Among them,nameThe parameter corresponds to the field name you defined in the "Contact Settings" on the backend (such asCellphone/Email/Qrcodeor custom by youWhatsApp)。You can choose to directly output the value of this field, or you can assign it to a variable for more flexible use in the template.

Let's see how to apply through some specific examples:

  • Show contact phone number:

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

    Here, we will embed the phone number directly intotel:the link, and users can make a call by clicking on their mobile phones.

  • Display contact email:

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

    Similar to the phone number, an email address can also be made intomailto:a link for users to click and send emails.

  • Display the WeChat QR code:

    <div class="wechat-qrcode">
        <p>扫码添加微信:</p>
        <img src="{% contact with name="Qrcode" %}" alt="微信二维码" style="width: 120px; height: 120px;">
    </div>
    

    WeChat QR codes are usually displayed in image form, and users can scan and add after scanning.

  • Display custom WhatsApp contact information:Suppose you have customized a namedWhatsAppthe parameter.

    <p>WhatsApp:{% contact with name="WhatsApp" %}</p>
    

    If your WhatsApp parameter value is a link, it can also be handled like other links:

    <p>WhatsApp:<a href="{% contact with name="WhatsApp" %}" target="_blank">点击聊天</a></p>
    

These contact details are usually placed at the footer, sidebar, or a dedicated "Contact Us" page on the website to ensure that users can find them easily.

A practical case: Build a comprehensive footer contact information area

Combining the above methods, you can easily build a footer area with multiple contact methods to enhance user experience:

<div class="footer-contact-info">
    <h3>联系我们</h3>
    <p>
        <span>联系人:</span>
        <span>{% contact with name="UserName" %}</span>
    </p>
    <p>
        <span>电话:</span>
        <a href="tel:{% contact with name="Cellphone" %}" rel="nofollow">{% contact with name="Cellphone" %}</a>
    </p>
    <p>
        <span>邮箱:</span>
        <a href="mailto:{% contact with name="Email" %}" rel="nofollow">{% contact with name="Email" %}</a>
    </p>
    <div class="social-media">
        {% if contact with name="Wechat" %}
        <div class="wechat-box">
            <span>微信:</span>
            <span>{% contact with name="Wechat" %}</span>
            <img src="{% contact with name="Qrcode" %}" alt="微信二维码" class="qrcode-small">
        </div>
        {% endif %}

        {% if contact with name="WhatsApp" %}
        <p>
            <span>WhatsApp:</span>
            <a href="{% contact with name="WhatsApp" %}" target="_blank" rel="nofollow">点击聊天</a>
        </p>
        {% endif %}

        {% if contact with name="Facebook" %}
        <p>
            <span>Facebook:</span>
            <a href="{% contact with name="Facebook" %}" target="_blank" rel="nofollow">访问主页</a>
        </p>
        {% endif %}
        <!-- 更多社交媒体或自定义联系方式 -->
    </div>
    <p>
        <span>地址:</span>
        <span>{% contact with name="Address" %}</span>
    </p>
</div>

In this example, we also added{% if ... %}Ensure that the content is displayed on the front end only when a contact method is configured in the background, to avoid blank links or incomplete information.In this way, Anqi CMS helps you manage and display your website's contact information to the utmost, thereby better serving your users with its high flexibility and ease of use.


Frequently Asked Questions (FAQ)

1. Why is there no display on the front-end website even though I have set the contact information in the background?This usually has several reasons. First, make sure you have filled in and saved the information correctly in the "Background Settings" > "Contact Information Settings". Second, check your website template

Related articles

How to retrieve and display the global settings information of a website, such as the website name, Logo, and filing number in the template?

When building website templates in AnQiCMS, we often need to display some general information at the website level, such as the name of the website, Logo image, and legal filing number required by law.This information is usually managed in the background global settings to ensure consistency across the entire site and ease of maintenance.AnQiCMS has a powerful template tag system, especially the `system` tag, which makes it very intuitive and efficient to obtain and display these global settings in the template.### Understanding Global Settings and `system`

2025-11-08

On the article detail page, how to obtain and display a list of recommended articles related to the current article?

In website content operation, improving user stay time and reducing bounce rate is the goal pursued by every operator.After a user reads an article, if they can immediately see other content that interests them, it will undoubtedly greatly enhance their engagement, thereby improving the overall interactivity and user experience of the website.While AnQiCMS (AnQiCMS) is a powerful content management system, it provides us with convenient tools to implement intelligent recommendations for article detail pages without complex development work.The list of recommended articles not only provides users with a deeper reading experience, but also guides them to browse more website content

2025-11-08

How to control the article list to only display documents under the current category and not include content from its subcategories?

When managing website content in Anqi CMS, we usually organize articles into different categories to form a clear hierarchical structure.This structure provides great convenience when managing content in the background.However, when displaying the list of articles on the front-end page, we sometimes need to control the display range of content more accurately, for example, we only want to display the articles directly published under the current category, and not include the content of its subcategories.Luckyly, AnQi CMS provides a simple and powerful solution for this: using the `archiveList` template tag's `child`

2025-11-08

How to define a new field in a custom content model and flexibly call and display these fields on the front-end page?

In AnQi CMS, using a custom content model to manage and display personalized content is one of its core strengths.This allows us to flexibly create dedicated data structures for different types of content according to specific business requirements.This article will discuss in detail how to define these custom fields in the background, as well as how to cleverly call and display them on the frontend page. ### Define a new field in the backend content model The content model is like a "blueprint" for content, it determines what information each type of content (such as articles, products, cases, etc.) should include. To define a new field

2025-11-08

How to use the article's `flag` attribute (such as 'Top Story', 'Recommendation') to filter and highlight specific content?

In AnQi CMS, efficiently managing and highlighting specific content is the key to website operation success.When the content of the website becomes increasingly rich, how to ensure that important information can quickly attract the attention of visitors and guide them to browse the core content, which has become a problem that every operator needs to think deeply about.The Anqi CMS provides a powerful "recommendation attribute" (flag) feature that allows you to easily filter and highlight specific content, thereby enhancing user experience and website operation effects.### Understanding the `flag` attribute of Anqi CMS The `flag` attribute, as the name suggests

2025-11-08

How to receive and display custom form fields from the backend in a frontend comment form?

In website operation, the message form is an important channel for interacting with users, collecting feedback and leads.AnQiCMS provides flexible comment functions, one very practical ability is to allow us to customize form fields in the background, and seamlessly present them in the front-end comment form to meet the personalized information collection needs of different business scenarios.Next, we will discuss in detail how to implement this feature in Anqi CMS.### One, define the custom message field in the background First, we need to enter the Anqi CMS backend management interface

2025-11-08

How to format an article's publish timestamp into a user-friendly date and time format, such as '2023 January 01 14:30'?

User-friendly date and time display is crucial for website content.A clear and readable time format not only improves the visitor's reading experience, but also helps them quickly understand the publishing or updating timeliness of the content.In AnQiCMS, formatting the publication timestamp of articles into a format such as '2023-01-01 14:30' is both flexible and efficient.Understanding the use of timestamps in AnQiCMS In the content managed by AnQiCMS, whether it is articles, products, or other custom models

2025-11-08

How to display a dynamic banner image on the homepage of a website and implement click-through?

Displaying dynamic banner images with click-through functionality on the website homepage is a common need to enhance the visual appeal and user interaction of the site.By utilizing the powerful functions and flexible template mechanism of AnQiCMS, we can easily achieve this goal.The entire process is mainly divided into two parts: background configuration and front-end template invocation. ### First Step: Configure Banner Image and Link To display a dynamic rotating Banner on the website homepage, you first need to upload the image and set the link in the AnQiCMS backend. Typically

2025-11-08