In the operation of a website, the ICP filing number and copyright information are indispensable components for the legal operation of the website and the protection of its own rights.For websites operating in mainland China, the ICP record number is an explicit legal requirement, which not only guarantees the legality of the website but also enhances users' trust in the website.The copyright information clarifies the ownership of the website content, which helps to protect original works from infringement.AnQiCMS as a comprehensive content management system, fully considers these practical needs, provides convenient settings and flexible template calling methods, allowing you to easily display these important information on your website.

To ensure that your AnQiCMS website displays the record number and copyright information correctly, we first need to enter the corresponding information in the background management system.Please log in to your AnQiCMS backend, find and click on the 'Backend Settings' option in the left navigation bar.In the expanded menu, select "Global Function Settings".

On the 'Global Function Settings' page, you will see several important configuration items, including 'Record Number' and 'Copyright Information'.In the 'Record Number' field, you can fill in the record number of your website obtained from the Ministry of Industry and Information Technology (MIIT) record management system, such as 'Beijing ICP for XXXXXXXX' or 'Guangdong ICP for XXXXXXXXXXX'.Please note that only the registration number itself needs to be filled in here, and not include suffixes such as “-1”.

The 'Copyright Information' field allows you to enter the website's copyright statement.You can fill in according to the actual situation, for example, fill in "© 2023 Your company name." All Rights Reserved. or include your company name, website domain, and a more detailed copyright statement.This field supports HTML content, which means you can add links or formatted text to better display your copyright information.After completing the information entry, remember to click the save button at the bottom of the page to ensure the changes take effect.

After the information entry is completed, the next step is how to display them on the website front-end page.AnQiCMS template system adopts a syntax similar to Django template engine, using specific tags to call the data set in the background.systemtags to call.

usually, the record number and copyright information are placed in the general template file of the website footer, such as one namedfooter.html/bash.htmlOr place it directly in the main template file. This ensures that this information is uniformly displayed on every page of the website.

In your template file, to display the ICP record number, you can use the following code snippet:

<p>
    <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">
        {% system with name="SiteIcp" %}
    </a>
</p>

This code will fetch the registration number you filled in from the backend and display it in a paragraph with a link.rel="nofollow"andtarget="_blank".

The code for displaying copyright information is slightly simpler:

<div>
    {% system with name="SiteCopyright" %}
</div>

If you wish to have the copyright year in the copyright information automatically updated to the current year to avoid the trouble of manually modifying it each year, AnQiCMS providesnowTo implement tags. You can combine your copyright notice like this:.

<p>&copy; {% now "2006" %} 您的公司名称. All Rights Reserved.</p>

Here are the{% now "2006" %}It will automatically output the year based on the current system time, for example, 2023.

It is worth mentioning that if your "copyright information" contains HTML tags (such as bold, links, etc.), when you use them directly{% system with name="SiteCopyright" %}When, AnQiCMS usually automatically handles HTML safe output to ensure that tags can be parsed and displayed normally. But if you assign the copyright information to a variable and then output it (for example{% system siteCopyright with name="SiteCopyright" %}To ensure that its HTML content is not escaped and displayed directly, it is recommended to add the character when outputting variables|safea filter, like{{siteCopyright|safe}}this.|safeThe filter tells the template engine that this content is safe and does not require HTML escaping.

After completing the template modifications, don't forget to save the file and visit your website's frontend page to view it.Ensure that the filing number and copyright information are displayed correctly, and that the link for the filing number can jump to the Ministry of Industry and Information Technology filing management system normally.These seemingly simple steps are the key details for building a professional and compliant website.

Common Questions (FAQ)

1. Why does the website front page not display any ICP filing number and copyright information even though I have set them in the background?

This is usually because the template file did not properly call this information. Please check if you have added it to the footer of the website or other common template files.{% system with name="SiteIcp" %}and{% system with name="SiteCopyright" %}Such code.If added, please confirm that the template file has been saved and updated to the server.Sometimes, browser cache may also cause you not to see the latest changes. You can try clearing the browser cache or accessing the website in incognito mode.

2. My copyright information needs to update the year every year, can AnQiCMS automatically achieve this?

Of course, you can. In the "Global Function Settings" in the background, in the "Copyright Information" field, replace the year part with the one provided by AnQiCMS.{% now "2006" %}Tags. For example, you can set the copyright information as:&copy; {% now "2006" %} 您的公司名称. All Rights Reserved., the system will automatically display the current year when rendering the page.

3. If my copyright information includes&copy;Do symbols or HTML tags need special handling to display correctly?

Generally, when you use directly in a template,{% system with name="SiteCopyright" %}When calling the background set copyright information, AnQiCMS template engine will automatically handle its HTML content, ensuring&copy;Equal signs and HTML tags can be parsed and displayed normally. Only when youSiteCopyrightAssign the value to a custom variable first, and then when outputting the variable, it may be necessary to add extra characters to the output to avoid the default escaping of HTML content.|safeFilter, for example{{myCopyrightInfo|safe}}to avoid the default escaping of HTML content.