How to create a "Contact Us" single page and dynamically embed all contact tags in AnQiCMS?

Calendar 👁️ 63

As an experienced website operations expert, I fully understand the importance of an efficient and easy-to-maintain "Contact Us" page for any corporate website.In such a powerful and flexible content management system as AnQiCMS, creating a page like this and dynamically embedding contact information not only enhances user experience but also greatly simplifies future content update work.Today, let me guide you step by step to achieve this goal.


How to create a "Contact Us" single page and dynamically embed all contact tags in AnQiCMS?

In the digital age, a clear and convenient 'Contact Us' page is the bridge of communication between the website and the user.It not only showcases the professional image of the company, but also serves as the first stop for potential customers to obtain key information.AnQiCMS with its flexible content model and powerful template tag system allows you to easily build a dynamic 'Contact Us' page that is both beautiful and easy to maintain.This article will detail how to use the core functions of AnQiCMS to create a single page integrated with all dynamic contact methods.

Step 1: Centralize your contact information configuration

AnQiCMS provides a centralized area to manage your website contact information, which greatly enhances the maintainability of the content.No matter how your phone number, address, or social media account changes in the future, you do not need to make in-depth code modifications, just update one place in the backend.

  1. Enter contact information settings: Log in to your AnQiCMS backend management interface, navigate to the left menu's“Background Settings”and then selectthe "Contact Information Settings".
  2. Fill in the default contact information: On this page, you will see a series of preset contact information fields, such as:
    • Contact: Your name or company representative.
    • Contact phone number: Your main contact phone number.
    • Contact address: Your company's detailed address.
    • Contact emailYour business email address.
    • WeChat IDYour WeChat personal account or public account name.
    • WeChat QR codeUpload your WeChat QR code image.
    • including QQ, WhatsApp, Facebook and other commonly used social media contact information. Make sure to fill in this information carefully, as it will be the basis for dynamic display on the front-end page.
  3. Custom extended contact informationIf the preset fields do not fully meet your needs, for example, if you need to display a Telegram account or a specific business cooperation link, AnQiCMS also supports it. You can find it at the bottom of the page."Custom Setting Parameters"Region, click 'Add parameter' to create a new field. Just define one"Parameter name"for exampleTelegram), and fill in“Parameter value”(Your Telegram ID or link), add a brief note and you've reserved space for any future contact methods.

Second step: Create a dedicated 'Contact Us' page

Next, we need to create a separate page on the website front-end to carry these contact information. The single-page feature of AnQiCMS is very suitable for this kind of static content page.

  1. Manage Page: Click on the left menu in the background management interface"Page Resources"and then select“Page Management”.
  2. Add a new single page: Click above the page“Add Single Page”Button, start creating your “Contact Us” page.
  3. Fill in the basic information of the page:
    • Page Name: Enter 'Contact Us', 'Contact Us' or any name you wish to display. This will be the text displayed on the page in the website navigation and title.
    • SEO title, keywords, descriptionMake sure to configure the SEO information for this page, which helps search engines better understand and index your contact page, enhancing the chances of users finding you through searches.
    • Custom URL: Set a concise and friendly URL, for example/contactor/about-us/contact. A clear URL is more friendly to users and search engines.
    • Single page contentYou can add some static, non-contact introduction text here, such as the company profile, service philosophy, or precautions that may be needed when contacting us.This content will be displayed together with the contact information tag we will dynamically embed later.
    • Single page templateThis is a critical step! Here, we will specify a dedicated template file for the 'Contact Us' page.Single page templateIn the field, you can enter the path of a custom template, for examplepage/contact.html. This setting tells AnQiCMS that when accessing this single page, it should load the specified template file to render the content.

Step 3: Customize the page template: Dynamically embed contact information

Now it's time to delve into the code level and make your contact information come to life. The template tag system of AnQiCMS makes this process intuitive and efficient.

  1. Create or modify the template file:

    • First, use FTP or a file manager to find the template directory you are currently using. It is usually located/template/{您的模板名称}/below.
    • Create a file named in the directory.pageThe folder (if it does not exist).
    • InpageInside the folder, create a new HTML file and name itcontact.html(The name you entered in the second step "Single Page Template").
    • If your website already has a genericpage/detail.htmltemplate, you can choose to copy its content ascontact.htmlThe basis, then make modifications.
  2. Use{% contact %}Dynamic embedding of contact information tags: AnQiCMS provides a very convenient template tag for dynamically calling contact information tags:{% contact %}. Through this tag, you can easily access all the contact information configured in the background.

    The following is anpage/contact.htmlexample code of a file that shows how to dynamically embed various contact methods.

    `twig {% extends ‘base.html’ %} {# Inherit your base template, which usually contains header, footer, and other common parts #}

    {% block title %}

    <title>{% tdk with name="Title" siteName=true %}</title> {# 动态获取页面标题,并附加网站名称 #}
    <meta name="keywords" content="{% tdk with name="Keywords" %}">
    <meta name="description" content="{% tdk with name="Description" %}">
    

    {% endblock %}

    {% block content %}

    {# 动态显示页面名称 #}
    <h1 class="page-title">{{ page.Title }}</h1>
    
    {# 调用后台配置的联系方式 #}
    <div class="contact-details">
        {% contact userName with name="UserName" %}
        {% if userName %}
            <p><strong>联系人:</strong>{{ userName }}</p>
        {% endif %}
    
        {% contact cellphone with name="Cellphone" %}
        {% if cellphone %}
            <p><strong>电话:</strong><a href="tel:{{ cellphone }}" rel="nofollow">{{ cellphone }}</a></p>
        {% endif %}
    
        {% contact contactEmail with name="Email" %}
        {% if contactEmail %}
            <p><strong>邮箱:</strong><a href="mailto:{{ contactEmail }}">{{ contactEmail }}</a></p>
        {% endif %}
    
        {% contact address with name="Address" %}
        {% if address %}
            <p><strong>地址:</strong>{{ address }}</p>
        {% endif %}
    
        {% contact wechat with name="Wechat" %}
        {% if wechat %}
            <p><strong>微信:</strong>{{ wechat }}</p>
        {% endif %}
    
        {% contact
    

Related articles

I entered HTML code in the contact information field, will the `contact` tag be safely parsed and displayed?

As an experienced website operations expert, I am well aware of the key role played by the Content Management System (CMS) in website security and content display.When it comes to user input and front-end display, especially for fields like contact information that may contain sensitive or dynamic information, how the underlying HTML code is handled is an important indicator of the security of a CMS system.Today, let's delve into the performance of AnQiCMS in handling HTML code in the 'Contact Information' field.

2025-11-06

What convenient operations does AnQiCMS provide if the website needs to update contact information in bulk after a redesign?

The website overhaul is an important step to improve user experience and brand image, however, the data update work that comes with it is often headache-inducing, especially when it comes to batch modifying the contact information that can be found everywhere on the website.For users of AnQiCMS, fortunately, this system took full consideration of operational efficiency from the very beginning, providing a series of convenient operations to make this task exceptionally easy.When talking about contact information on a website, it usually includes phone number, email, address, social media links, and so on.

2025-11-06

Does AnQiCMS contact information label support automatic switching to display corresponding language contact information based on the user's visited language?

## Contact information label for AnQiCMS: How to switch display intelligently under multilingual environments?In today's global business environment, multilingual support for websites is no longer an option, but a necessity for businesses to expand into international markets.For enterprises that use content management systems (CMS) to build and manage websites, how to efficiently handle multilingual content, especially for key information such as contact details, is a common concern for operators.AnQiCMS (AnQiCMS) is a system focused on providing enterprise-level content management solutions

2025-11-06

How to ensure that the contact label output content of AnQiCMS is SEO-friendly?

AnQi CMS is a content management system tailored for small and medium-sized enterprises and content operation teams, which has integrated the concept of search engine optimization from the very beginning.In website operation, contact information is not only a bridge for communication between users and us, but also an important signal for search engines to understand our business and confirm our authenticity.Therefore, how to ensure that the content output by the AnQiCMS contact information tag is SEO-friendly is a key point that every website operator should pay attention to.##

2025-11-06

How to individually and safely call the QQ contact number and generate a click link in AnQiCMS templates?

As an expert well-versed in website operations, I am willing to give you a detailed explanation of how to conveniently and relatively safely call a QQ contact number and convert it into a user-friendly clickable link in the AnQiCMS template.This not only enhances user experience, but also balances information protection.In AnQiCMS template, call the QQ contact number separately and safely to generate a click link In modern website operations, providing convenient contact methods is a key factor in improving user experience and promoting business transformation.QQ is a commonly used instant messaging tool in China

2025-11-06

How to display the YouTube channel link set in the AnQiCMS backend and ensure the validity of the link?

As an experienced website operation expert, I am well aware of the importance of gathering the brand's influence from various platforms to the official website.The YouTube channel as the core battlefield for video content marketing, the effective display and management of its link is particularly crucial in content management systems like AnQiCMS.Today, let's delve into how to set up and accurately display your YouTube channel link on the AnQiCMS backend.### Make your YouTube channel shine on the AnQiCMS website

2025-11-06

What are the differences and similarities in the calling methods of links in templates for social media such as `Tiktok` and `Pinterest`?

As a senior website operation expert, I have a deep understanding of the design concept and actual operation of AnQiCMS in the social media link call aspect.Faced with increasingly important social platforms like `Tiktok` and `Pinterest`, AnQiCMS provides a set of efficient and flexible template calling mechanisms.Today, let's delve into the methods of calling social media links like Tiktok and Pinterest in AnQiCMS and how they differ from other platforms.--- Unlock Social Media

2025-11-06

Can I flexibly implement the `contact` tag of AnQiCMS to display multiple WhatsApp contacts on the page?

How to flexibly display multiple WhatsApp contacts in AnQiCMS?Unlock the advanced usage of the `contact` tag In today's global business environment, WhatsApp has become an important tool for efficient communication between businesses and customers.Whether it is for sales consultation, customer service, or specialized support for different products or regions, businesses may need to display multiple WhatsApp contact methods on their websites.The Anqi CMS is a powerful and flexible content management system that naturally also provides a convenient way to display contact information.

2025-11-06