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> ©{% 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©), 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.