How to call and display AnqiCMS system configuration information on the front page, such as the website name, Logo, or filing number?

Calendar 👁️ 79

When building and managing a website, we often need to ensure that core brand information, such as the website name, Logo, and the registration number required by laws and regulations, can be consistent on all pages of the website and can be updated at any time.AnqiCMS provides a user-friendly and powerful template system, making it very simple and efficient to call and display these global configuration information on the front page.

The '万能钥匙' in AnqiCMS template system:systemTag

AnqiCMS template system uses a syntax similar to Django, it provides a namedsystemThe core label, specially used for calling and displaying various information configured in the background "Global Function Settings".You can imagine it as a convenient channel, directly connecting to your website configuration center.

UsesystemThe tag is very flexible. You can choose to directly output the required value, or you can assign it to a variable and then reference it elsewhere in the template. The basic call format is{% system 变量名称 with name="字段名称" %}. Among them,nameThe parameter is used to specify which system configuration to retrieve.

Let's look at several common and practical examples to see how to flexibly use it on the front page.system.

The website name is called and displayed

The website name usually appears in the browser title bar (<title>tag) and page content to identify the website. BysystemLabels, it becomes easy to get the website name.

You can directly insert it at the required position, like in HTML.<head>Partly, in order to optimize search engine results, the page title usually contains the content of the page itself followed by the site name as a suffix. Although AnqiCMS has specialtdkTags to handle the page Title, Keywords, and Description, but if you just want to display the website name directly in the page content,systemThe tag is preferred:

<title>我的页面标题 - {% system with name="SiteName" %}</title>

<h1>欢迎访问 {% system with name="SiteName" %}!</h1>

Displaying the website logo

The website logo is the visual core of the brand image, generally placed at the top of the website, in the navigation bar, and other prominent positions. The URL to obtain the logo image is equally simple and clear:

<a href="/">
    <img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %} Logo" />
</a>

Here we not only called the Logo URL (SiteLogo) but also used the previously obtained website name (SiteName) as the image'saltThe attribute value is very helpful for improving the accessibility (Accessibility) and search engine optimization (SEO) of the website.

The display and call of the record number.

For domestic websites, the filing number is a legal requirement that must be displayed, usually placed at the footer of the website. ThroughsystemThe tag calls the filing number very directly:

<p>
    <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">
        {% system with name="SiteIcp" %}
    </a>
    &copy; {% now "2006" %} {% system with name="SiteName" %} 版权所有
</p>

This code not only displays the filing number but also automatically generates a link to the Ministry of Industry and Information Technology filing query website and addsrel="nofollow"andtarget="_blank"Attributes, all this is common **practice for footer links. At the same time, we also called the current year ({% now "2006" %}) and the website name to construct the complete copyright statement.

Copyright information call and display

In addition to the filing number, the copyright information of the website is often found in the footer. If your copyright information may contain HTML tags (such as bold, links, etc.), don't forget to use them when calling.|safeA filter to ensure that HTML content is parsed and displayed correctly, rather than being escaped as plain text.

<div>
    {% system siteCopyright with name="SiteCopyright" %}
    {{ siteCopyright|safe }}
</div>

Here, we first declareSiteCopyrightthe content to assign tositeCopyrightthe variable, then through{{ siteCopyright|safe }}Output, ensure that its HTML structure is not destroyed.

Call custom global parameters

The strength of AnqiCMS lies in its ability to allow more custom global configuration parameters. For example, if you want to display a specific "help page link" in some place on the website, and this link does not belong to any built-in system field, you can add a custom parameter in the "global feature settings" back-end, for example namedHelpUrlThen you can call it like this in the template:

<nav>
    <a href="{% system with name="HelpUrl" %}">获取帮助</a>
</nav>

Modify it in the background as long as this way is used.HelpUrlThe value, all pages that call it will synchronize the update, greatly improving management efficiency.

Integrate information into the template.

These system configuration information is usually placed in the public template files of the website, such asbase.html(the overall framework of the website),header.html(the header part) orfooter.html(Footer section). By calling these core files appropriatelysystemLabel, you can ensure that all pages of the website display these key information uniformly, avoiding repeated modification and potential inconsistencies.

In summary, throughsystemLabel, AnqiCMS allows website operators to manage and display global configuration information of the website flexibly and efficiently.Whether you need to update the website name, change the logo, or adjust the filing number, you only need to perform one operation in the background, and the front-end page will be synchronized updated, greatly improving the efficiency and consistency of content management, keeping your website always up-to-date and professional.


Frequently Asked Questions (FAQ)

1. I have modified the website name or Logo in the background, but the front page did not update immediately, what is the matter?

This is usually caused by browser cache or AnqiCMS system cache.First, you can try clearing the browser cache and then force refresh the page.If the problem persists, please log in to the AnqiCMS backend, find and click the "Update Cache" feature in the left menu, manually clear the system cache, and the page content should display normally.

2. I want to<title>How to display the current page title and website name at the same time?

AnqiCMS provides special for the page Title, Keywords, and Description (TDK)tdkLabel. Use this label to control the SEO elements of the page more finely. For example, in the page<head>section, you can set it like this:

<title>{% tdk with name="Title" siteName=true %}</title>

here,tdkThe tag will automatically retrieve the title of the current page andsiteName=trueThe parameter automatically appends the site name as a suffix to the page title, thus generating a complete, SEO-friendly page title.

**3. If I want to display the phone number, email, and other information in the "Contact Information Settings" on the front end, do I also use `

Related articles

How to protect the original copyright of the "Anti-collection and Watermark Management" function of Anqi CMS when displaying content on the front end?

In today's era of泛滥in digital content, the value of original content becomes increasingly prominent.Whether it is an article written with hard work or a carefully photographed picture, every original work embodies the sweat and wisdom of the creator.However, the problem of content being randomly collected and images being used without compensation has always been a headache for many website operators and self-media creators.This not only harms the legitimate rights and interests of the original creators, but may also make it difficult for original content to obtain the应有的 ranking in search engines, even affecting brand credibility.AnQi CMS deeply understands the importance of original content for enterprises and self-media, it is not just a content publishing platform

2025-11-09

How to quickly refresh the front-end display after updating the website content strategy or URL in AnQi CMS's 'Content Replacement' feature?

## Website Content Update and Front-end Refresh Secret: Detailed Explanation of AnqiCMS "Content Replacement" Function Content updates and URL structure optimization are common in the daily operation of a website.Whether it is the upgrade of the brand name, the replacement of specific keywords, or the reconstruction of page links, these changes are directly related to the visitor experience and search engine ranking of the website.However, if the website contains a large amount of content, manually modifying it one by one is undoubtedly a time-consuming and labor-intensive huge project, and it is also prone to errors.

2025-11-09

How to configure the 'Advanced SEO Tool' of AnqiCMS to improve the visibility of a website in search engine result pages?

In today's digital age, making your website stand out in the vast sea of internet information and easily discoverable by potential users is one of the keys to success.Search engine optimization (SEO) is the important way to achieve this goal.AnqiCMS as an efficient content management system, deeply understands the importance of SEO, and therefore built-in powerful advanced SEO tools to help users systematically improve the visibility of their websites on search engine result pages (SERP).Next, we will delve into the various SEO settings of AnqiCMS

2025-11-09

How to use the "Scheduled Publishing" feature of AnQi CMS to automatically display content on the front end according to a plan?

In daily website content operation, maintaining continuous updates and accurate targeting is the key to attracting users and enhancing website activity.However, manually publishing content is often limited by factors such as time and personnel.AnQiCMS (AnQiCMS) fully understands the pain points of operators and has specially provided the powerful and practical function of "scheduled release" to help users achieve automated content management and automatically display content on the front page according to the plan.

2025-11-09

How to display the contact information set in the AnqiCMS backend on the front page and support custom parameter display?

A website can effectively convey information, one of the core elements being that visitors can easily find the contact information.Whether it is in the footer of the website, a special "Contact Us" page, or in the article content, clear and clear contact information is the key to improving user experience and building trust.AnqiCMS (AnqiCMS) with its flexible and customizable features allows you to easily manage this information in the background and display it on the front page, even supporting custom parameters to meet various business needs.Next, let's take a look at how to use the AnqiCMS website front page on your site

2025-11-09

How to customize the homepage title, keywords, and description through AnqiCMS's TDK tags to improve search engine display?

In website operation, it is crucial to have your website displayed better in search engines, and the TDK (Title, Description, Keywords) tags on the homepage are the core to achieve this goal.AnqiCMS as a SEO-friendly content management system provides intuitive and powerful features to help you easily customize these key elements.By cleverly setting the homepage TDK, you can not only improve the visibility of the website in the search results, but also attract more target users to click and visit.### Understand TDK

2025-11-09

How to build and display the AnqiCMS multi-level website navigation list, and support custom styles and subtitle display?

Building an efficient, intuitive, and user-friendly website depends on carefully designed navigation systems.In AnQiCMS, building a multi-level website navigation list, and supporting custom styles and subtitle display, is a powerful and flexible feature.It allows content operators to easily create menu structures that adapt to various complex scenarios according to business needs.

2025-11-09

How to implement breadcrumb navigation in AnqiCMS templates and control the display of the home page name and document title?

In website operation, a clear navigation path is crucial for user experience and search engine optimization (SEO).Breadcrumb Navigation as an auxiliary navigation method can directly tell users where the current page is in the website structure, effectively reduce the bounce rate, and help search engines better understand the website hierarchy.

2025-11-09