How to dynamically display
Display the filing number at the bottom of the website, which is not only a requirement for compliance with relevant laws and regulations, but also an important factor in enhancing the professionalism and user trust of the website.For users using AnQiCMS, dynamically displaying the filing number through the built-in powerful functions of the system is a very convenient operation, which does not require frequent code modifications and greatly improves the maintenance efficiency of the website.
Set the record number content in the background
First, we need to set your website filing number in the Anqi CMS backend management interface. This is the basis for all dynamic display content, ensuring the accuracy of the information.
After logging in to the backend, find the left navigation bar and click on the "Backend settingsthen click onGlobal Settings". In the global settings page, you will see a name called the "Record numberThe input box. Just fill in your website filing number here, for example, 'Guangdong ICP No. 12345678'.Please note that in most cases, you only need to fill in the main part of the filing number and do not need to add a suffix like “-1”.
After filling in, remember to click the button at the bottom of the page "Save”Button, enable the settings. In this way, the content of the record number is successfully stored in the system.”
Dynamically call the record number in the website template
The registration number content has been saved in the background, and the next step is to display it on the website's front end.In most cases, the filing number will be displayed in the footer (Footer) section of the website.In AnQi CMS, the common parts of the website such as headers and footers are generally concentrated in the template directory.bash.htmlor independentpartial/footer.htmlin such files.
AnQi CMS provides a very convenient system setting tagsystemWe can use it to dynamically obtain various system information from the background settings. For the filing number, we can useSiteIcpThis specific field name is to be called.
You can find the appropriate location in the footer HTML code and insert the following code snippet:
<div class="footer-icp">
备案号:<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a>
</div>
Let's take a simple look at this code:
{% system with name="SiteIcp" %}This line of code is crucial. It tells AnQi CMS to retrieve the global settings from the background.SiteIcp(i.e., the record number) field value, and display it here.<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">...</a>We recommend enclosing the filing number in a<a>tag. This has several advantages:href="https://beian.miit.gov.cn/"This is the official Ministry of Industry and Information Technology filing query website, providing users with a convenient query entrance, which increases the transparency and credibility of the website.rel="nofollow"This is a SEO** practice. It tells search engines not to pass link weight to this external link because it is an administrative link, which usually does not belong to the core content of the website.target="_blank"When the user clicks the filing number, the filing query website will open in a new tab to avoid the user leaving the current website and improve the user experience.
Paste this code into the appropriate position in the HTML footer of your website and save the modified template file.
Verification and cache refresh
After completing the template modification, save the file and visit the front page of your website. You should be able to see the dynamic display of the filing number at the bottom of the website.
If the record number does not display immediately, or the displayed content is outdated, don't forget to clear the website cache.The AnQi CMS backend is usually at the top of the page or near the "System Upgrade" module, where there is a function to "Update Cache" or "Clear Cache", just click it.At the same time, it is also recommended to clear the cache of your browser itself (usually press Ctrl+F5 or Command+Shift+R to force refresh the page and clear the cache).
Through the simple and intuitive backend settings of AnQi CMS and the powerful template tag functions, dynamically displaying the website filing number becomes effortless.This practice not only complies with the regulations, but also makes your website maintenance more efficient and convenient, allowing you to update the filing information without touching the code, so that you can focus more energy on content operation.
Frequently Asked Questions (FAQ)
1. Why am I still not displaying or displaying old information on the front page after setting the filing number according to the steps?
This is usually caused by caching. First, make sure you have saved the record number in the "Global Settings" of AnQi CMS backend, and the template file has also been saved.Then, be sure to clear the security CMS system cache and try to force refresh your browser cache.If the problem still exists, please check if you have placed the code in the correct template file (usually related to the footer)bash.htmlorpartial/footer.htmlAnd in{% system with name="SiteIcp" %}label'snameIs the parameter spelled correctly?SiteIcpCase-sensitive).
2. Do I need to modify the template code if the website filing number is updated?
Completely unnecessary! This is the advantage of using Anqi CMS to dynamically display the filing number.When your record number changes, you just need to log in to the Anqi CMS backend, go to “Background Settings” -> “Global Settings”, find the “Record Number” text box, update it to the new record number and save.The system will automatically update the front-end display, you do not need to modify any template code.
3. Can I use a similar method to dynamically display other footer information besides the filing number?
Of course. Anqi CMS'ssystemThe tag is very flexible. For example, you can{% system with name="SiteCopyright" %}display the copyright information configured in the background “Global Settings”. In addition,contactTags such as{% contact with name="Cellphone" %}) Can dynamically display contact information, email, etc. For some content that does not belong to the system default settings but is still desired to be centrally managed and dynamically displayed, you can also add through the "Custom Settings Parameters" in the "Global Settings" and then usesystemlabel'snameSpecify the parameter name you define to call it.