The information at the bottom of the website, such as the filing number and copyright statement, may seem unremarkable, but it is an important reflection of the website's professionalism, legal compliance, and brand trust.For operators, correctly displaying this information and ensuring that the year can be automatically updated is not only convenient but also avoids the trouble of manually modifying it every year.In AnQiCMS, achieving this goal is very direct and flexible.
Set the record number and copyright information in the background
In AnQiCMS, the website备案 number and copyright information can be configured in the unified "Global Settings".This allows us to centrally manage these important site metadata.
First, please log in to your AnQiCMS backend. In the left navigation menu, find and click on theBackend settings" option, then select "Global Settings.
After entering the global settings page, you will see some options related to the basic information of the website:
- Filing NumberHere, you need to fill in your website record number, for example, 'Beijing ICP preparation number XXXXXXXXXX'.AnQiCMS when called in a template, usually intelligently generates a link to the Ministry of Industry and Information Technology's government service platform (beian.miit.gov.cn) to ensure compliance.
- Copyright InformationThis field is used to fill in the copyright statement of your website.You can enter your company name or personal name here as needed, for example, "Your Company Name."}]All Rights Reserved.”It should be noted that we only fill in the fixed copyright statement part here, and the year part will be dynamically generated by the template tag.
Please make sure to click the "Save" or "Submit" button at the bottom of the page after filling in the information, to ensure that your changes take effect.
Display the filing number and copyright information at the bottom of the website and automatically update the year
The information has been configured in the background, and the next step is to display them at the bottom of the website front page.The website footer is usually the place to put this information, and the footer code generally exists in the common files of the website template.
In AnQiCMS, template files are usually located in/templateThe directory contains an independent directory for each template. A common practice is to extract common parts such as headers (header) and footers (footer) and store them in suchpartial/footer.htmlThis code snippet file, or directly included in the main template filebase.html.
You need to access your AnQiCMS website file directory through tools such as FTP or Baota panel, then find the template folder currently in use, and locate the area responsible for rendering the footer..htmlfile.
After finding the corresponding position, we can use the template tags provided by AnQiCMS to dynamically call the record number, copyright information, and current year set in the background.
Display the record number: In the place where you want to display the filing number, insert the following tag:)
<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a>This code will retrieve the filing number you filled in from the background and automatically add a tag with
nofollowThe external link of the property, pointing to the Ministry of Industry and Information Technology filing query website, which is very beneficial for SEO and compliance.Display copyright information and automatically update the year: 为了让版权年份自动更新,AnQiCMS提供了一个English
{% now %}Label. This label can be displayed according to the Go language time formatting rules you specify. We only need to get the year part, which can be"2006"this format string.Assume you have filled in "Copyright Information" field with "Your Company Name.
© {% now "2006" %} {% system with name="SiteCopyright" %}So, every time a user visits the website, the system will automatically retrieve the current year and display it, avoiding the麻烦 of manual modification every year.
A complete footer information area may look like this:
<div class="footer-info"> <p> © {% now "2006" %} {% system with name="SiteCopyright" %} <span class="separator">|</span> <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a> </p> </div>You can add based on your design requirements,
<span>Labels, CSS classes, or other HTML elements to beautify the display of this information.
Tips and **Practice
- Clear the cache in timeIn order to ensure that the front-end page displays the latest changes immediately after you modify the template file or background settings, please make sure to go to the AnQiCMS background, click on the bottom of the left menu menu.Update the cache.
- Compatibility CheckIn the modification is completed, it is recommended to check your website on different browsers and devices (such as computers, mobile phones, tablets) to see if the filing number and copyright information are displayed correctly, and whether the style remains good.
- Ensure information accuracy: Although the system can help you process automatically, please make sure that the record number and copyright statement filled in the background are accurate.
By following these steps, you can correctly and efficiently display the record number and copyright information at the bottom of the AnQiCMS website, and enable the copyright year to be automatically updated, adding a touch of professionalism and peace of mind to your website.
Common Questions (FAQ)
1. Why hasn't the front-end updated after I changed the filing number or copyright information?
This is usually caused by website caching.AnQiCMS to improve access speed, will cache the page content.When you have modified the settings in the background, you need to manually clear the cache to display the latest content on the front end.Please log in to the AnQiCMS backend, find and click on "Update Cache" at the bottom of the left menu, wait for a moment, and then refresh your website page.
2.{% now "2006" %}the tag in"2006"What does it mean? Can I change it to something else?
"2006"is a special "reference time" used for date and time formatting in Go language. In Go language, date and time formatting is not done usingYYYY-MM-DDSuch placeholders, rather than through a fixed reference time (January 2, 2006, 15:04:05 -0700 MST), define the output format."2006"Means that you want to display only the year part of the reference time. If you want to display other formats, such as2006-01-02it will be displayed as当前年份-当前月份-当前日期,15:04it will be displayed as当前小时:当前分钟, keep it for scenarios where the year needs to be automatically updated"2006"is the simplest and most effective way.
3. If my website does not have a record number, can I leave the record number field blank?
Of course, you can.If the website you operate does not need to be registered in China (such as for overseas users or hosted on overseas servers), the 'registration number' field on the backend can be left blank.{% system with name="SiteIcp" %}Label to call, if the background field is empty, no content will be displayed here on the front end, this will not cause any page error, it will just leave a blank.You can also adjust the template as needed, and the related HTML structure for the record number will not be displayed if this field is empty.