Customize AnQiCMS website footer information: guide to copyright statement 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.An 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, record number, and other information you want to display in the footer of the website in AnQiCMS.
I. Understanding the importance of footer information
The website footer is one of the details that users often pay attention to while browsing the page.Here you can display copyright information, which can effectively declare the ownership of your content and prevent plagiarism; The filing number is a necessary identification for the legal operation of websites in Mainland China, enhancing the credibility of the website.In addition, many websites will also choose to place company addresses, contact information, and social media links in the footer, all of which together constitute the professional image of the website.
II. Configuring footer information in AnQiCMS backend
AnQiCMS provides an intuitive backend management interface, making it very simple to customize the footer information.
Firstly, please log in to your AnQiCMS background management system, find the left menu item "Backend settings", and click to enter "[en] Global function settings". This is the core area for configuring general information for the entire site.
Filing number (Site ICP)In the "Global Function SettingsIf your website has been registered in mainland China, just fill in the registration number you obtained (for example:京ICP备12345678号) accurately.Please note that here it is usually only necessary to fill in the filing number itself, without the additional suffix “-1”.
Copyright Information (SiteCopyright)Immediately below the "Registration Number
© 2023 [您的公司名称]. All Rights Reserved.EnglishAnQiCMS supports entering HTML content here, which means you can add links to the company name or perform simple text formatting to better meet your brand display needs.Customize 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 wish to display the company's detailed address, customer service email, or other operational information in the footer.At the bottom of the "Global Function Settings" page, there is a "Custom Setting Parameters" area.
- Click the "Add" button, you can create new custom parameters.
- In the 'Parameter Name' field, enter a concise English or pinyin identifier, which will serve as the name you use to call this information in your template (for example:
CompanyAddressorServiceEmail). - In the "Parameter Value" field, enter the specific content you wish to display, for example: "
北京市海淀区某某大街100号or[email protected]. - The "Note" field is used for a brief description of the purpose of this parameter, for easy management and search in the future.
Three, call the footer information in the template
Configure the background information first, and the next step is to display these data in the footer area of the website front end.AnQiCMS uses a template engine developed in Go language, which separates content from display, so you need to edit the website's template files.
Locate the footer template fileGenerally, the website's footer code is located in the directory of the template you are currently using
partial/footer.htmlorbash.htmlFile in.These files contain the shared common parts of all web pages on the site.You can edit these files online through the 'Template Design' feature of the AnQiCMS backend, or download the template files to your local machine for modification.Use
systemTag call background informationAnQiCMS provides a namedsystemThe general label, specifically used to call various information from the 'Global Function Settings' in the background within templates. Its basic usage is{% system 变量名 with name="字段名称" %}.Call the filing number:If your filing number needs to link to the Ministry of Industry and Information Technology filing 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 filing number you entered in the background will be output directly.Invoke copyright information and the current year:Copyright information is usually displayed dynamically with the current year, ensuring it stays 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.{% now "2006" %}is a convenient tag that dynamically displays the current year. "2006" is a special representation of date formatting in the Go language, representing a four-digit year.Call custom parameter:For the custom parameters you added in the background, such as named
CompanyAddresscompany address information, you can call it like this:<p>公司地址:{% system with name="CompanyAddress" %}</p>
Example of integrating footer codeIntegrate the above elements, your
partial/footer.htmlThe footer part of the file 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 modifications to the template file, refresh the website page, and you will see that the custom footer information has been successfully displayed.
Common Questions (FAQ)
How do I modify the footer information, but the website front-end does not update immediately?This is usually caused by caching. First, please try to clear the AnQiCMS system cache. Log in to the admin backend, click the bottom menu on the left side of theUpdate the cache”。If there is still no update, it may be a browser cache issue, please force refresh the page in the browser (usually
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 additional information added through the "Custom Setting Parameters" under the "Global Function Settings" as introduced in this article, you can also use the "English"}]Backend settings" under the "Contact information settings”to configure contact information such as phone number, address, email, WeChat, and other information. These details can be called in the template.
{% contact with name="字段名称" %}Tags in the template, very suitable for placement at the footer.If I want the footer to display different content, for example, to display a specific footer on certain specific pages, what should I do?By default, the footer information in the "Global Feature Settings" is all