How to use AnQiCMS's `{% system %}` tag and `{% contact %}` tag to combine and display the global contact information of the website?

Calendar 👁️ 63

As an experienced website operations expert, I know that efficiently and uniformly managing website content is the foundation of success in an increasingly complex network environment.AnQiCMS (AnQiCMS) leverages the efficient and flexible customization capabilities of the Go language to provide us with many conveniences.Today, let's delve deeply into the two seemingly simple yet extremely powerful tags in Anqi CMS——{% system %}and{% contact %}And how to cleverly combine them to build a unified and easy-to-maintain website global contact information display system.

The value of unified website identification and contact information.

During the operation of any website, information such as the website name, Logo, copyright statement, contact phone number, email, and company address often needs to appear frequently on various pages (such as the header, footer, about us, contact us)If this information is scattered in all corners of the template, every modification means a huge amount of work and potential risk of errors.It is more important that inconsistent information not only affects user experience, reduces brand trust, but may also distract search engines' attention, affecting SEO performance.

Of Security CMS{% system %}and{% contact %}Labels are born to solve this pain point. They allow us to centrally store these core global information in the background and dynamically display the front-end page through simple label calls, thereby greatly improving operation efficiency and the professionalism of the website.

{% system %}Label: The unified outlet of the core information of the website

{% system %}Tags are mainly used to obtain and display the general configuration information of a website, such as website name, Logo, filing number, copyright content, and basic URL.This information constitutes the "identity card" of the website.

Working principle and commonly used fields:

When you need to display the website name, you do not need to enter it manually on each page. Just configure it once in the background "Global Function Settings". In the template, you can call it like this:

<title>{% system with name="SiteName" %} - 您的页面标题</title>
<h1><img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}" /></h1>
<p>&copy; {% now "2006" %} {% system with name="SiteName" %}. {% system with name="SiteCopyright" %}</p>

here,nameThe parameter specifies the field name of the system setting item to be obtained, for exampleSiteName(Website name),SiteLogo(Website Logo),SiteIcp(Website record number),SiteCopyright(Copyright content) and so on.{% now "2006" %}This is an auxiliary label used to dynamically obtain the current year, ensuring that the copyright year is always up-to-date without manual updates.

In this way, no matter how many pages you reference the website name or Logo, when these information changes on the backend, the front-end page will be updated in real time to ensure consistency.

{% contact %}Label: A tool for accurately displaying contact information

with{% system %}Tags are similar,{% contact %}The tag focuses on extracting and displaying a website's contact information. Whether it's traditional phone numbers, emails, addresses, or modern social media accounts, it can handle it easily.

Working principle and commonly used fields:

In the Anqi CMS backend "Contact Information Settings", you can manage all contact details统一. For example, your phone number isCellphone, your email isEmail, your company address isAddress. You can call it like this in the template:

<p>联系电话:<a href="tel:{% contact with name="Cellphone" %}">{% contact with name="Cellphone" %}</a></p>
<p>电子邮件:<a href="mailto:{% contact with name="Email" %}">{% contact with name="Email" %}</a></p>
<p>公司地址:{% contact with name="Address" %}</p>

nameThe parameters here correspond to the various fields of the contact information, such asUserName(Contact),Cellphone(Contact phone),Address(Contact address),Email(Contact email),Wechat(WeChat ID),QrcodeWeChat QR code and others. Anqi CMS even supports a variety of social media accounts such asWhatsApp/Facebook/TwitterAnd others, making it easy for your website to display multi-channel contact information.

An ingenious combination: Build a unified global contact information area

Combine these tags and you can build a rich, easy-to-maintain global contact information area in the website header, footer, or a dedicated "Contact Us" page.

Imagine, at the bottom of your website, you want to display the website name, copyright information, contact phone number, and company address. Your template code might look like this:

<footer class="site-footer">
    <div class="container">
        <div class="row">
            <div class="col-md-6 copyright-info">
                <p>&copy; {% now "2006" %} {% system with name="SiteName" %}. {% system with name="SiteCopyright" %}</p>
                <p>备案号:<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a></p>
            </div>
            <div class="col-md-6 contact-info">
                <p>联系电话:<a href="tel:{% contact with name="Cellphone" %}">{% contact with name="Cellphone" %}</a></p>
                <p>电子邮件:<a href="mailto:{% contact with name="Email" %}">{% contact with name="Email" %}</a></p>
                <p>公司地址:{% contact with name="Address" %}</p>
                <!-- 还可以添加自定义联系方式,例如WhatsApp -->
                {% contact whatsapp with name="WhatsApp" %}
                {% if whatsapp %}
                <p>WhatsApp: <a href="https://wa.me/{{ whatsapp }}" target="_blank">{{ whatsapp }}</a></p>
                {% endif %}
            </div>
        </div>
    </div>
</footer>

In this example, we elegantly integrate the brand information and contact details of the website.If the phone number or company address in the background changes, or if you need to update the copyright information, you just need to make one modification in the corresponding module of Anqi CMS, and all pages that reference these tags will be automatically updated without touching a single line of template code.

Advanced Application: Custom Parameters and Multi-Site Support

The strength of Anqi CMS is not just limited to this.

Custom parameters:If you find that the built-in fields do not meet all your needs, for example, if you want to display a special customer service WeChat official account or company founding year on your website, you can customize new parameters on the "Global Function Settings" or "Contact Information Settings" page. After setting, these customized parameters can also be accessed by{% system with name="你的自定义参数名" %}or{% contact with name="你的自定义参数名" %}Invoke, greatly expands the flexibility of tags.

Multi-site support:For users who operate multiple websites or sub-brands, Anqi CMS'ssiteIdParameters are particularly important. They are specified in the tags.siteIdfor example{% system with name="SiteName" siteId="2" %}), you can easily call configuration information of different sites, even if they run in the same security CMS instance, they can also maintain independent global information.This is undoubtedly a huge boost in management efficiency for agents or companies with multiple business lines.

Implement **practice.

  • Principle of centralized management: Always configure global and repetitive information through the AnQi CMS backend and proceed to

Related articles

The `{% contact %}` tag supports which filters to format the output content?

As an experienced website operation expert, I know that how to flexibly display and process information in a content management system is the key to improving website user experience and operational efficiency.AnQiCMS (AnQiCMS) provides us with great convenience with its powerful template engine and rich tag system.Today, let's delve into the `{% contact %}` tag and how to make your website's contact information display more exquisite and practical through its output content filters.

2025-11-06

If an AnQiCMS contact field is empty, how can you display default text in the template instead of leaving it blank?

## AnQiCMS template optimization: How to cleverly display default text when the contact information field is empty?In website operation, maintaining the integrity of website content and user experience is crucial.AnQiCMS (AnQiCMS) provides a solid foundation for building various websites with its flexible content management and powerful template functions.

2025-11-06

How to use `{% if %}` in AnQiCMS template to determine if a contact field exists or is not empty?

In the AnQiCMS template, we often need to decide whether to display a certain area or present information in a different way based on the presence or absence of content.This is especially critical for sensitive and important information such as contact details, we never want to leave a bunch of empty titles or broken links on the page.Today, as your website operations expert, I will take you in-depth to understand how to cleverly use the `{% if %}` tag in AnQiCMS templates to determine whether the contact information field exists or is not empty, making your website interface more intelligent and friendly.

2025-11-06

Whether the `Qrcode` image output by the contact information label supports custom `alt` text attribute?

As an experienced website operations expert, I know that every detail in a content management system can affect the overall performance of the website, whether it's user experience or search engine optimization (SEO).Today, let's delve deeper into the QR code image output of the contact information label in AnQiCMS (AnQiCMS), whether the `alt` text attribute supports customization, and how we can use it flexibly.### Security CMS QR code image `alt` text attribute customization: Insightful functions and practical strategies In modern website operations

2025-11-06

Why did I use the `{% contact %}` tag in the AnQiCMS template but the content did not display on the front end?

As an experienced website operations expert, I know that even a small template tag problem may confuse and anxiety the operator while managing and maintaining a website.Today, let's delve into a problem that AnQiCMS (AnQi CMS) users occasionally encounter: when the `{% contact %}` tag is used in the template, no content is displayed on the front page.Don't worry, this is usually not a big problem. Just follow the steps to investigate, and we can find the cause and solve it soon.

2025-11-06

After updating the contact information on the AnQiCMS backend, why didn't the front end take effect immediately?

Hello! As an experienced website operation expert, I fully understand the confusion and anxiety you may feel when you find that the front-end does not take effect immediately after updating the AnQiCMS backend settings.This is a very common phenomenon in website operation, usually not a system failure, but a mechanism designed to improve website performance and user experience is at work.Today, let's delve into the possible reasons behind this and provide a detailed solution.### AnQiCMS Back-end contact information update, why does the front-end not take effect immediately

2025-11-06

What are the common configuration mistakes between AnQiCMS contact information settings and the `contact` tag call?

## Common Misconfigurations in Setting up AnQi CMS Contact Information: Make Your Contact Information Clear and Visible Displaying contact information clearly and effectively in website operations is a key step in building user trust, promoting communication, and transforming business. AnQiCMS provides a convenient backend setting and template tag, allowing you to easily manage and call these key information.However, even such convenient features are often hindered by seemingly minor configuration mistakes, resulting in contact information not displaying properly on the front page, causing confusion for operators

2025-11-06

How to test the `siteId` parameter to correctly identify and call data in the multi-site contact information tag?

The AnQi CMS, as a powerful enterprise-level content management system, undoubtedly provides great convenience and flexibility to operators with its multi-site management capabilities.How to ensure that each site can accurately call its exclusive information when managing multiple brands or sub-sites, especially for such critical data as contact information, it is particularly important.Today, let's delve into how to test and verify the recognition and data call of the `siteId` parameter in contact label tags in a multi-site environment.### Recognize `siteId`

2025-11-06