Step 1: Fill in the filing number and copyright information in the background

To display the filing number and copyright information on the website front end, you first need to enter it in the AnQiCMS backend. This process is very intuitive:

First, log in to your AnQiCMS admin interface. Find and click in the navigation menu on the left.“Background Settings”.“Global Settings”Options. On this page, you will see a series of configurable website basic information. Search carefully“Record number”and“Copyright information”Two fields. In“Record number”In the field, enter the Ministry of Industry and Information Technology filing number for your website, for example “Shanghai ICP xxxxxxxx No.”.Please note that it is usually not necessary to include the suffixes such as "-1" after the record number.“Copyright information”Field, enter the copyright statement you want to display in the footer, for example, "Your company name."}]All Rights Reserved.This field supports HTML content. If you need richer styles, you can directly enter HTML code here.“Save”Button, ensure that all changes have been successfully stored in the system.

Step two: Modify the website template file to implement information calling.

After entering the information into the background, the next step is to modify the website template files so that this information can be displayed in the website footer.The template file organization structure of AnQiCMS is clear, usually the footer part is encapsulated in a public file for convenience of the entire website call.

Firstly, you need to determine which template package the current website is using. All template files of AnQiCMS are stored in the root directory./templateIn the folder. Go into the folder of the template package you are currently using, find the template file responsible for the footer content, which is usually namedfooter.html/bash.htmlOr similar names. These files often contain general code for the website header and footer and are inherited or included by other pages.

After finding the corresponding footer template file, open it with a text editor. Add the following AnQiCMS template tags at the location where you want to display the filing number and copyright information:

<footer>
    <p>
        {%- system icp with name="SiteIcp" %} {# 获取备案号 #}
        {%- if icp %}
            <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{{ icp }}</a>
        {%- endif %}

        {%- system copyright with name="SiteCopyright" %} {# 获取版权信息 #}
        {%- if copyright %}
            <span>&nbsp;&nbsp;&copy;{% now "2006" %} {{ copyright|safe }}</span>
        {%- endif %}
    </p>
</footer>

The purpose of this code is:

  • {%- system icp with name="SiteIcp" %}: This line of code will retrieve the备案号码 you filled in from the background “global settings” and assign it to a variable namedicp.{%- ... %}under the line-Used to remove the blank line where the tag is located, making the generated HTML code more tidy.
  • {%- if icp %}: This is a conditional judgment, the link of the filing number will be displayed only when the filing number is not empty.
  • <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{{ icp }}</a>This will generate a link to the China Ministry of Industry and Information Technology (MIIT) government service platform, which is a common compliance practice.rel="nofollow"Tell the search engine not to track this link,target="_blank"which means to open the link in a new window.
  • {%- system copyright with name="SiteCopyright" %}: Similarly, this line of code will retrieve the 'Copyright Information' you have filled in the background and assign it tocopyrightVariable.
  • <span>&nbsp;&nbsp;&copy;{% now "2006" %} {{ copyright|safe }}</span>This will display the copyright symbol©And then{% now "2006" %}Dynamically retrieve the current year (make sure the year is always up to date) and then display the copyright statement you fill in|safeThe filter is necessary, it tells the template engine tocopyrightThe content within the variable should be rendered as safe HTML rather than escaping special characters, which is particularly important when the copyright information you enter in the background may contain HTML tags.

Step 3: Save and update the cache

After modifying the template file, please make sure to save the file. Since AnQiCMS has a caching mechanism, the website front-end may not display the update immediately.

Now, you need to enter the AnQiCMS backend again, click the button below the left menu bar,“Update Cache”clear the system cache, and refresh your website before