How to get and display the record number and copyright information of the website in the AnQiCMS template?

Calendar 👁️ 77

In the operation of the website, the filing number (ICP) and copyright information are essential elements for building user trust and complying with laws and regulations.For websites built using AnQiCMS, whether it be a corporate website or a personal blog, it is crucial to clearly display this information.Luckyly, AnQiCMS provides a very intuitive and flexible way to manage and display this content.

Next, we will together learn how to obtain and display the website filing number and copyright information in the AnQiCMS template.

Back-end settings for website filing number and copyright information

First, you need to enter this basic information in the AnQiCMS background management system.AnQiCMS provides a dedicated settings entry in this aspect, allowing you to easily manage the global configuration of the website.

  1. Log in to the backend:Log in to your AnQiCMS backend management interface.
  2. Navigate to global settings:Find and click on “Backend settingsSelect thenGlobal feature settings.
  3. Enter information:In the "Global feature settings" page, you will see that theRecord numberAndCopyright informationTwo important fields.
    • In theRecord numberEnter your website filing number, for example京ICP备XXXXXXXX号-X.
    • In theCopyright informationEnter your copyright statement, for example本网站所有内容版权归属于 [您的公司名称或个人姓名] 所有. Here you can enter brief text or some basic HTML tags.
  4. Save settings:After filling out, please make sure to click the "Save" button at the bottom of the page to ensure that your settings take effect.

This information will be stored by AnQiCMS once it is set up in the background, for the website front-end template to call.

Obtain and display the filing number and copyright information in the template.

AnQiCMS provides a powerfulsystemThe tag is used to retrieve the various website information from the background "Global Function Settings".By this tag, you can easily display the filing number and copyright information at any location on the website (usually in the footer area).

1. Display the website filing number

The record number usually needs to be linked to the official query page of the China Ministry of Industry and Information Technology's government service platform. This is not only a compliance requirement but also enhances the authority and credibility of the website. You can use it in the template.systemTags combined with HTML's<a>to achieve:

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

In this code block:

  • {% system with name="SiteIcp" %}It will directly output the record number you filled in the background.
  • href="https://beian.miit.gov.cn/"Is the official link for the Ministry of Industry and Information Technology record query.
  • rel="nofollow"Tell the search engine not to track this link, it is a common SEO practice to avoid passing the weight of your website to external sites.
  • target="_blank"Make sure that when the record number link is clicked, it will open in a new browser tab, thus keeping the user on your website.

2. Display website copyright information

The display of copyright information is equally simple, usingsystemlabel and specifySiteCopyrightJust do it.

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

Here is an important detail: If the content you enter in the "Copyright Information" field on the back end includes HTML tags (such as<p>/<strong>/<em>In order to make these tags be parsed and rendered correctly on the front-end and not display the original HTML source code, you need to addsystemthe variable obtained from the tag|safefilter.

For example, if the content of your copyright information is<strong>© 2023 All Rights Reserved.</strong>then it should be used in the template like this:

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

In addition, to automatically update the copyright year, you can also combine with the provided by AnQiCMSnowThe tag is used to dynamically retrieve the current year, keeping your copyright information always up to date:

<div>
    {% system copyrightInfo with name="SiteCopyright" %}{{ copyrightInfo|safe }} © {% now "2006" %}
</div>

{% now "2006" %}of"2006"It is a special string defined by the Go language for date formatting, representing the retrieval of a four-digit year.

3. Integrate into website footer example

In practice, the filing number and copyright information are usually displayed together at the footer of the website. The following is a common footer code snippet that integrates the filing number, dynamic year, and copyright information.

<footer>
    <div class="container">
        <p>
            <!-- 显示备案号并链接到官方查询平台 -->
            <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">
                {% system with name="SiteIcp" %}
            </a>
        </p>
        <p>
            <!-- 显示版权信息和动态年份 -->
            {% system siteCopyright with name="SiteCopyright" %}{{ siteCopyright|safe }} © {% now "2006" %}. All Rights Reserved.
        </p>
    </div>
</footer>

The editing location of the template file

These global website information is usually placed in the public files of the website template, such astemplateUnder the directoryfooter.htmlorbase.html. You can access the “template design”Function, edit these template files online.When making changes, please pay attention to the encoding format of the template file, make sure to save it using UTF-8 encoding to avoid Chinese garbled characters.

provided by AnQiCMSsystemTags, website filing number and copyright information display becomes very simple and efficient. This not only helps your website meet legal requirements, but also conveys a professional and reliable image to visitors.


Frequently Asked Questions (FAQ)

Q1: Why did I fill in the filing number on the back end, but the website front end did not display it?A1: Firstly, make sure you have filled in the record number and successfully saved it in "Backend Settings" -> "Global Function Settings". Secondly, check if the correct template files have been used on your website.{% system with name="SiteIcp" %}Call the label. If the label is misspelled, or the template file has not been saved or refreshed correctly,

Related articles

How to implement multilingual content switching and correct display on the front end of AnQiCMS website?

When building a website for global users, providing multilingual content is a crucial step.AnQiCMS as a comprehensive content management system provides flexible and powerful support to achieve this goal.This article will discuss in detail how to implement multi-language content switching and correct display on the AnQiCMS website.## Global Website Creation: AnQiCMS Overview of Multilingual Capabilities AnQiCMS's multilingual support is designed to help website operators easily meet the needs of global content promotion.

2025-11-09

How to use the `archiveList` tag to display the latest article list of a specified category on the AnQiCMS homepage?

On AnQiCMS, the homepage is the first stop for visitors to understand your content, therefore, it is crucial to display the latest and most relevant articles efficiently.AnQiCMS provides a powerful and easy-to-use template tag system, where the `archiveList` tag is your reliable assistant for accurately displaying the latest articles of a specified category on the homepage.### `archiveList` tag introduction: The core of the home page dynamic content The `archiveList` tag is a core tool in the AnQiCMS template engine used to obtain the document list

2025-11-09

How to dynamically display the document title of the current page in AnQiCMS templates?

In AnQi CMS template design, dynamically displaying the document title of the current page is a basic and important function.It not only concerns the intuitive experience of users when browsing the website, but is also an indispensable part of search engine optimization (SEO) strategy.AnQi CMS provides a simple and efficient way to meet this requirement, let's explore how to flexibly use it in templates.

2025-11-09

How to control the display form of the front-end link of category, document, and single page through custom URL alias?

In website operation, the display form of the front-end link (URL) is crucial for user experience, search engine optimization (SEO), and brand image.A concise, meaningful, and well-structured URL can not only help users better understand the content of the page but also improve the efficiency of search engine crawling and ranking.AnQiCMS (AnQiCMS) fully understands this need and provides a flexible custom URL alias function, allowing us to accurately control the link display of categories, documents, and single pages on the website's front end according to our needs.

2025-11-09

How to customize the display of the publication time and page views of articles using AnQiCMS template tags?

In the display of website content, the publication time and the number of views of the article are important elements in conveying information to readers and enhancing the value of the content.A clear publication time allows readers to understand the timeliness or timeliness of the content, while the number of views can reflect the popularity of the content.AnQiCMS with its flexible template mechanism allows us to easily customize the display of this key information to adapt to the design styles and user needs of different websites.

2025-11-09

What content models does AnQiCMS support, and how can they be flexibly displayed on the front end?

In AnQi CMS, content is not just simple articles or products, it is a dynamic ecosystem that allows users to freely define and display various types of information according to their actual business needs.This high degree of flexibility is due to its powerful content model support and the limitless possibilities brought by the front-end template engine. ### Flexible and diverse content model: the skeleton of information One of the core advantages of Anqi CMS is its highly flexible content model.It is not preset with a few fixed content types to limit your choices, but provides a powerful mechanism that allows users to build like building blocks

2025-11-09

How to display the related Tag tag list of articles or products on the AnQiCMS detail page?

How can we make users find the content they are interested in more efficiently while also improving the visibility of the content in website operations, which is a problem we often think about.The detail page of an article or product, in addition to the core content, providing a list of related Tag tags is undoubtedly a good method to achieve this goal.AnQiCMS as a flexible and efficient content management system provides an intuitive and powerful Tag label feature, allowing you to easily display these related information on the detail page.### Learn about AnQiCMS Tag feature In AnQiCMS backend

2025-11-09

How to correctly parse and display HTML content in the rich text editor in the AnQiCMS template?

Managing website content in AnQiCMS, the rich text editor is undoubtedly our powerful assistant in creating rich and beautiful web pages.It allows us to easily add styles, images, links, even tables, making the content free from the boredom of plain text.However, ensuring that these meticulously edited rich text contents are presented correctly on the website's frontend template is a key skill that every AnQiCMS user needs to master.

2025-11-09