In the operation of a website, the ICP filing number and copyright information are indispensable components for the legal operation and protection of the website's rights and interests.For websites operating in mainland China, the ICP record number is an explicit legal requirement, which not only ensures the legality of the website but also enhances users' trust in the website.Copyright information specifies the ownership of the website content, helping to protect original works from infringement.AnQiCMS as a comprehensive content management system fully considers these actual 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 filing number and copyright information correctly, we first need to enter the corresponding information in the backend management system.Please log in to your AnQiCMS backend, find and click the 'Backend Settings' option in the left navigation bar.In the expanded menu, select 'Global Function Settings'.

On the "Global Feature Settings" page, you will see several important configuration items, including "Record Number" and "Copyright Information".In the "Registration Number" field, you can enter the registration number obtained by your website from the Ministry of Industry and Information Technology (MIIT) registration management system, such as "Beijing ICP preparation XXXXXXX number" or "Guangdong ICP preparation XXXXXXXXXXX number".Please enter the registration number itself and do 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 including your company name, website domain, and more detailed copyright statements.This field supports HTML content, which means you can add links or formatted text to better display your copyright information.After completing the information, remember to click the save button at the bottom of the page to ensure the changes take effect.

After the information is entered, the next step is how to display them on the website front page.The AnQiCMS template system uses a syntax similar to the Django template engine, calling data from the background settings through specific tags.We can make use of the registration number and copyright information we just enteredsystemCall the tag.

As a rule, the filing number and copyright information are placed in the general template file of the website footer, such as namedfooter.html/bash.htmlOr place it directly in the main template file. This ensures that this information is 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 retrieve the record number you entered from the background and display it in a paragraph with a link.This link usually points to the official query page of the Ministry of Industry and Information Technology (MIIT) filing management system (beian.miit.gov.cn), which is convenient for users to verify the filing information of the website and also conforms to the **practice of SEO, usingrel="nofollow"andtarget="_blank".

The code for displaying copyright information is a bit simpler:

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

If you wish the year in the copyright information to be automatically updated to the current year to avoid the trouble of manual modification every year, AnQiCMS providesnowTo implement the label. You can combine your copyright statement like this:

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

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

It is worth noting that if your 'Copyright Information' contains HTML tags (such as bold, links, etc.), when you use them directly,{% system with name="SiteCopyright" %}At that time, AnQiCMS usually automatically handles safe HTML output to ensure that tags can be normally parsed and displayed. But if you assign the copyright information to a variable and 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 in variable output|safea filter, like{{siteCopyright|safe}}this. Like that.|safeThe filter tells the template engine that this content is safe and does not need to be HTML-escaped.

After you have completed the template modifications, don't forget to save the file and view your website's front page.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.

Frequently Asked Questions (FAQ)

1. Why is there no display on the front page of the website although I have set the ICP filing number and copyright information in the background?

This is usually because the template file has not correctly called these information. Please check if you have added it in the website's footer or other general 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 caching may also prevent you from seeing the latest changes. You can try clearing your browser cache or accessing the website in incognito mode.

2. Do I need to update the year of my copyright information every year, can AnQiCMS do it automatically?

Of course you can. You can replace the year part in the "Global Function Settings" in the "Copyright Information" field with the one provided by AnQiCMS.{% now "2006" %}Label. 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 processing to display correctly?

Generally, when you use directly in the template,{% system with name="SiteCopyright" %}When calling the copyright information set in the background, the AnQiCMS template engine will automatically process its HTML content to ensure&copy;And the equal sign and HTML tags can be normally parsed and displayed. Only when you willSiteCopyrightThe value should first be assigned to a custom variable, and then when the variable is output, it may be necessary to add it extra when outputting the variable to avoid the HTML content from being escaped by default.|safeFilter, for example{{myCopyrightInfo|safe}},to avoid the default escaping of HTML content.