How to fetch and real-time update the global settings such as website filing number, copyright information, etc. after saving and exiting in the background

Calendar 👁️ 63

As a senior AnQiCMS website operation personnel, I am well aware of the importance of website global settings for brand image, user trust, and legal compliance.The registration number, copyright information, and other content is not only the identity proof of the website, but also a key detail to convey professionalism to visitors.AnQiCMS was designed from the beginning to fully consider these core needs, providing an intuitive backend management interface and ensuring that this critical information can be presented in real-time and conveniently on the website front end.

Configuration and function of the AnQi CMS background global settings

On the AnQiCMS admin interface, you can easily find and manage this important information that affects the global website.These settings are concentrated in the "Global Settings" area under the "Background Settings" menu.Here, you can configure a series of core parameters including 'Website Name', 'Website Logo', 'Record Number', and 'Copyright Information'.These settings will be immediately updated to the system's data storage once saved, ready for real-time calls from the website's front end.For example, the national requirement for website filing numbers (such as "SiteIcp") and copyright statements (such as "SiteCopyright") are the foundation of legal operation of the website, and their correct display is crucial for building user trust.

Core mechanism of real-time acquisition of global settings on the front page

AnQiCMS to ensure that the front-end page can flexibly and in real time obtain these global settings, provides a powerful and concise template tag——systemLabel.This tag is used to call the various parameters configured in the background "Global Settings".No matter when you update the filing number or copyright information in the background, just click "Save and Exit", and these changes will be immediately received by the system.systemThe label extracts information from the latest data and presents it on the front end, achieving real-time updates without manual cache cleaning (unless the system detects that specific caches need to be updated).

systemLabel usage detailed explanation and example

systemThe usage method of the label is very intuitive, its basic syntax is{% system 变量名称 with name="字段名称" %}. In which, the field name corresponds to the internal identifier of each parameter in the background global settings.

For example, to display the website filing number you have set in the background, you can use it like this:

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

In this example,{% system with name="SiteIcp" %}It will directly output the filing number you filled in the background. We also combined the use of{% now "2006" %}Get the current year dynamically and combine{% system with name="SiteName" %}Display the website name to construct a complete copyright statement.

If you want to assign the value obtained to a variable so that it can be used multiple times in the template or for more complex processing, you can specify a variable name:

{% system siteIcpValue with name="SiteIcp" %}
{% system siteCopyrightValue with name="SiteCopyright" %}

<footer>
    <p>备案信息:<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{{ siteIcpValue }}</a></p>
    <p>{{ siteCopyrightValue|safe }}</p>
</footer>

here,siteIcpValueandsiteCopyrightValueThis is the variable you customize, which stores the filing number and copyright information. Note that the copyright information may contain HTML tags (such as&copy;), so when using{{ siteCopyrightValue }}When outputting, it is usually necessary to add|safea filter to prevent HTML entities from being escaped, ensuring correct rendering.

The AnQiCMS global settings also support the 'custom setting parameters' feature. This means you can add your own global variables according to specific needs, such as a help page linkHelpUrlThese custom parameters can also be accessed throughsystemby using the tag, just setnamethe attribute to the parameter name you customized on the backend:

{% system helpPageLink with name="HelpUrl" %}
<nav>
    <a href="{{ helpPageLink }}">帮助中心</a>
</nav>

In this way, website operators can manage and display all the global information of the website very flexibly, ensuring the professionalism, consistency, and timeliness of the website content.

FAQ

Why did the front-end page not immediately display the new content after I updated the global settings on the back-end?Answer: AnQiCMS global settings are usually effective in real time.If the front-end page does not display the new content immediately after the update, please make sure you have clicked the 'Save and Exit' button.If the problem still exists, it may be due to your browser cache or CDN cache.You can try clearing your browser cache, force refresh the page (Ctrl+F5 or Cmd+Shift+R), or contact your CDN service provider to clear the CDN cache.In rare cases, if the website has enabled deeper server-side caching, it may be necessary to clear it through the "update cache" feature on the back end.

Ask: Can I add some custom global information to the website without modifying the template file?Of course, you can.AnQiCMS's "Global Settings" provides the "Custom Setting Parameters" feature.You can add new parameter names (such as "AnalyticsCode") and parameter values (such as your tracking code snippet).{% system with name="AnalyticsCode" %}This way to call and display this information. In this way, you can flexibly manage and update these custom contents without touching the template file.

Question:systemDoes the tag support global settings calls in a multi-site environment?Answer: Yes,systemThe tag supports multi-site environments. If you have created multiple sites through the multi-site management feature in the background and need to call the global settings data of other sites, you cansystemthe tag withsiteIdSpecify the target site with parameters, for example{% system with name="SiteName" siteId="2" %}This allows for flexible management and display of global information for different sites.

Related articles

After setting up the '301 Redirect Management' in AnQiCMS backend, do you need to refresh the server configuration after 'Save and Exit'?

As an expert deeply familiar with the operation of AnQiCMS, I fully understand your concern for the activation mechanism and possible operations after you make important settings in the background.Regarding your question about whether the server configuration needs to be refreshed after setting up '301 Redirect Management' in the AnQiCMS backend and clicking 'Save and Exit'?This issue, I will elaborate on it for you. In the Anqi CMS backend management system, after you have completed the setup of the 301 redirect rules and clicked "Save and Exit", usually

2025-11-06

If you modify the template code and click 'Save' while editing the template in the AnQiCMS backend, what is the difference from saving and exiting the file through the SSH tool?

As an experienced CMS website operation person in an enterprise, I fully understand the close integration between content creation and technical maintenance.In daily work, whether it is to optimize the user experience, improve SEO effects, or implement personalized function displays, we may need to modify the website template.The AnQi CMS provides various ways to complete this task, the most common of which is through the background "Edit Template" feature and directly through the SSH tool to operate server files.Although both methods ultimately point to modifying the template file, but in terms of operation process, immediacy

2025-11-06

Where is the MySQL password located in the `docker-bt-mysql-pass.png` screenshot when installing AnQi CMS with Docker panel and how do I save and exit?

During the deployment of AnQi CMS, we often use the Docker feature of Baota panel to simplify the environment configuration.When you follow the instructions, while installing the Docker version of MySQL database for Anqi CMS on the Baota panel, you will encounter an important step: obtaining the MySQL root password.For many users who are new to the system, after seeing the screenshot "bt-docker-mysql-pass.png

2025-11-06

How to 'Save and Exit' and make the changes take effect after testing AnQiCMS under MacOS environment?

As an experienced website operator, I am well aware of the importance of modifying the configuration file and ensuring its correct effectiveness when testing and managing AnQiCMS (AnQiCMS) in the MacOS environment.AnQiCMS with its efficient and flexible features has become an important tool for our content management.In daily maintenance and functional testing, precisely applying configuration changes is the foundation for ensuring the stable operation of the system and the expected functioning of new features.

2025-11-06

How does AnQiCMS achieve unified management of multiple sites and reduce redundant work?

As a professional who has been deeply involved in content operation and is familiar with AnQiCMS (AnQiCMS), I am well aware that how to efficiently achieve unified management and minimize duplicate work when managing multiple websites is the core issue that operators are concerned about.AnQiCMS was designed from the beginning to make multi-site management one of its core advantages, providing users with an ideal solution through a simple and efficient system architecture.

2025-11-06

How does AnQiCMS' multilingual support help enterprises expand into international markets?

As a professional who has been deeply engaged in website operations and extensively using AnQiCMS (AnQiCMS), I know that in today's wave of globalization, it has become an inevitable trend for enterprises to seek broader market space through content export.And language is often an invisible barrier between enterprises and international users.The strong multilingual support provided by AnQi CMS is the key tool to solve this pain point, it lays a high-efficiency and localized content path for enterprises to expand into international markets.

2025-11-06

How does the pseudo-static and 301 redirection function of AnQi CMS improve SEO effectiveness?

As an experienced website operator familiar with AnQiCMS, I know the importance of Search Engine Optimization (SEO) for website traffic and business growth.How to enhance the visibility and user experience of a website through system functions is the core concern in daily content management work.The pseudo-static and 301 redirection features provided by AnQi CMS are our powerful assistants in the SEO battlefield.They not only simplify the operation, but also fundamentally optimize the website structure, helping the content stand out in search engines.### Optimize Website Address Structure

2025-11-06

How can AnQiCMS quickly build website content through content collection and batch import?

As a website operator who is deeply familiar with AnQiCMS, I know that content is the foundation of a website, and how to efficiently and high-qualityly build and update content has always been the core challenge of operational work.AnQiCMS with its enterprise-level content management features provides us with two powerful tools for content collection and batch import, greatly accelerating the construction process of website content.How to quickly build website content through content collection and batch import in AnQiCMS?In the ever-changing online environment of today

2025-11-06