Customize AnQiCMS website footer information: guide to copyright declaration and record number setting
The website footer, although at the bottom of the page, is an indispensable area for conveying important information, building brand trust, and meeting legal requirements.A clear and complete footer can enhance the professionalism of the website and provide visitors with convenient legal information and contact details.This article will introduce in detail how to customize the copyright statement, filing number, and other information you want to display in the footer of the website in AnQiCMS.
I. Understand the importance of footer information
The website footer is one of the details that users often pay attention to while browsing the page.Display copyright information, which can effectively declare your content ownership and prevent theft;The record number is a necessary identification for the legal operation of Chinese mainland websites, enhancing the credibility of the website.In addition, many websites choose to place company addresses, contact information, social media links, and other such elements in the footer, all of which contribute to the professional image of the website.
II. Configure footer information in AnQiCMS background
AnQiCMS provides an intuitive backend management interface, making the information needed for custom footers very simple.
First, please log in to your AnQiCMS backend management system, find the left menu of the “Backend settings”, click to enter the “Global feature settings”. This is the core area for configuring the common information of the entire site.
Filing number (SiteIcp)In the "Global Function Settings" page, you will see a field named "Record Number".If your website has been registered in Mainland China, simply fill in the registration number you obtained (for example: Beijing ICP No. 12345678) accurately here.Please note that here you usually only need to fill in the record number itself, without the additional suffix “-1”.
Copyright Information (SiteCopyright)Immediately below the "record number" is the "copyright information" field. You can fill in your copyright statement as needed
© 2023 [您的公司名称]. All Rights Reserved.. AnQiCMS supports entering HTML content here, which means you can add links to your company name or perform simple text formatting to better adapt to your brand display needs.Custom settings parametersIn addition to the preset "record number" and "copyright information" fields, AnQiCMS also allows you to add custom parameters to meet more personalized footer content display.For example, you may want to display the company's detailed address, customer service email, or other operational information in the footer.At the bottom of the "Global Feature Settings" page, there is a "Custom Setting Parameters" area.
- Click the "Add" button to create a new custom parameter.
- Enter a concise English or拼音 identifier in the “Parameter Name” field, which will serve as the name you use to call this information in the template (for example:
CompanyAddressorServiceEmail) - Enter the specific content you want to display in the "Parameter Value" field, for example: "
北京市海淀区某某大街100号or[email protected]. - The "Note" field is used to briefly describe the purpose of this parameter, for easy management and search in the future.
Three, call the footer information in the template
After configuring the background information, the next step is to display this data in the footer area of the website's front end.The AnQiCMS template engine is developed using Go language, which separates content and display, so you need to edit the website's template files.
Locate the footer template fileGenerally, the footer code of the website is located in the directory of the template you are currently using
partial/footer.htmlorbash.htmlIn the files. These files contain the shared common parts of the website pages.You can edit these files online through the 'Template Design' feature of the AnQiCMS backend, or download the template file to your local machine for modification.Use
systemTag call background informationAnQiCMS provides a namedsystemA general label used to call the various information items in the background "Global Function Settings" in the template. Its basic usage is{% system 变量名 with name="字段名称" %}.Call the record number:If your record number needs to link to the MIIT record query website, you can write it like this:
<p> <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank"> {% system with name="SiteIcp" %} </a> </p>{% system with name="SiteIcp" %}The record number you filled in the background will be output directly.Call the copyright information and the current year:Copyright information is usually displayed dynamically with the current year to keep it up to date:
<p> {% system with name="SiteCopyright" %}. © {% now "2006" %} </p>Here
{% system with name="SiteCopyright" %}It will output the copyright content you set in the background and then{% now "2006" %}It is a convenient label that dynamically displays the current year. "2006" is a special representation of Go language time formatting, indicating a four-digit year.Call a custom parameter:For custom parameters you add in the background, such as named
CompanyAddresscompany address information, you can call it like this:<p>公司地址:{% system with name="CompanyAddress" %}</p>
Integrated footer code exampleCombine these elements, your
partial/footer.htmlThe footer part of the document may look like this:<footer> <div class="container"> <p> {% system with name="SiteCopyright" %}. © {% now "2006" %} </p> {%- if system.SiteIcp %} {# 判断备案号是否存在,如果存在才显示 #} <p> <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank"> {% system with name="SiteIcp" %} </a> </p> {%- endif %} {# 调用自定义参数 - 公司地址 #} {%- if system.CompanyAddress %} {# 假设您设置了CompanyAddress自定义参数 #} <p>公司地址:{% system with name="CompanyAddress" %}</p> {%- endif %} {# 调用联系方式设置中的邮箱,这部分通常在tag-contact.md中有更详细介绍 #} {%- if contact.Email %} <p>联系邮箱:<a href="mailto:{% contact with name="Email" %}">{% contact with name="Email" %}</a></p> {%- endif %} {# 更多页脚内容... #} </div> </footer>
After saving your changes to the template file, refresh the website page, and you will see that the custom footer information has been successfully displayed.
Frequently Asked Questions (FAQ)
How to handle the situation where the footer information has been modified but the website front-end does not update immediately?This is usually due to caching. First, try to clear the AnQiCMS system cache. Log in to the admin backend, click the bottom menu item on the left side of the “Update CacheIf the update is still not reflected, it may be a browser cache issue. Please force refresh the page (usually by pressing Ctrl+F5 on Windows or Cmd+Shift+R on Mac).
Ctrl + F5orCmd + Shift + R)What information can I display in the footer besides the copyright statement and filing number?AnQiCMS provides great flexibility. In addition to the information introduced in this article about adding extra information through the "Custom Settings Parameters" in the "Global Function Settings", you can also make use of the "Backend settings"under the "Contact information settingsTo configure contact information, phone numbers, addresses, email addresses, WeChat, and other information, these can be accessed through
{% contact with name="字段名称" %}tags can be called in the template and are very suitable for placement at the footer.How can I make the footer display different content, such as displaying a specific footer on certain pages?By default, the footer information in the "Global Function Settings" is complete