As a senior CMS website operation personnel of a well-known security company, I know that the copyright information at the footer of the website is not only an important part of legal compliance, but also an embodiment of the brand's professionalism.A security CMS provides users with a flexible and convenient way to manage and display this information.Below, I will introduce how to customize and display the copyright information of the website footer in AnQiCMS.
Customize and display AnQiCMS website footer copyright information
The footer area of a website usually contains important information such as copyright statements, filing numbers, contact information, and more.This content is crucial for enhancing the professional image of the website, ensuring legal compliance, and providing user trust.AnQi CMS provides a straightforward and flexible mechanism that allows operators to easily customize and manage the key information displayed in the website footer.
First, set the copyright information of the website, we need to go to the AnQiCMS backend management interface.In the left navigation bar, find and click on "Background Settings", then select "Global Function Settings".On this page, you will see a field named "Copyright Information".This is the place where you can enter your website copyright statement.It is noteworthy that this field supports HTML content, which means you can not only enter plain text but also add links, bold text, or other basic HTML tags to meet more complex display needs.For example, you can enter© 2023-{% now "2006" %} YourCompanyName. All Rights Reserved.of whichYourCompanyNameReplace with your actual company name and use HTML entities.©Indicates the copyright symbol.
Next, we need to display these copyright information set up in the background on the front page of the website.The footer of a website is usually defined in the template file.According to the Anqi CMS template design agreement, the footer content is likely located in a namedbash.htmlor public code file.partial/footer.htmlIn such code snippet files. You can use the/templateFind these files in the template folder you are currently using. You can open the corresponding template file for editing using the built-in template editing feature of AnQiCMS.
In the template file, you can call the copyright information set in the background by using specific tags. Anqi CMS providessystemLabel, used to retrieve the system global configuration. To display the copyright content you have filled in the background "Global Function Settings", you need to insert the following code snippet:
{% system with name="SiteCopyright" %}
If you need to safely parse the obtained copyright content into HTML (because the backend may have entered HTML tags), you can combine|safeThe filter is used to avoid HTML tags from being escaped, ensuring they are rendered correctly.
{{- systemSiteCopyright with name="SiteCopyright" %}{{systemSiteCopyright|safe}}
In order to keep the year in the copyright statement up to date, you can also take advantage of the services provided by AnQiCMSnowLabel to dynamically display the current year. This way, you don't have to manually update the year information every year.nowThe usage of the label is{% now "2006" %}of which"2006"It is a Go language date formatting string representing the year. Therefore, a common footer copyright statement can be combined with both of these to achieve, for example:
<p>© 2023-{% now "2006" %} YourCompanyName. All Rights Reserved. {{ systemSiteCopyright|safe }}</p>
In addition to the default "Copyright Information" field, if your website has more detailed copyright requirements, such as distinguishing different copyright holders, specific license information, or more detailed legal statements, AnQiCMS also provides a "Custom Settings Parameters" feature.You can find this area on the 'Global Function Settings' page.Here, you can add new parameters and name them (for exampleLicenseType/LegalDisclaimer),and fill in the corresponding value. Then, in your footer template, you can call and display these additional information, such as:{% system with name="您自定义的参数名" %}的方式来调用并显示这些额外的信息,例如:
<p>版权所有:{% system with name="CopyrightHolder" %}</p>
<p>许可证类型:{% system with name="LicenseType" %}</p>
By following these steps, you can flexibly and efficiently customize and display the necessary copyright information in the footer of the AnQiCMS website, ensuring that your website is both professional and compliant.
Frequently Asked Questions (FAQ)
1. Where should I find and edit the website footer template file?
In most cases, the footer content of a website is defined in the public file or snippet file in the theme folder you are currently using. According to the AnQiCMS template production conventions, you can/templateLocate in the current template theme folder under the directorybash.htmlfile, or inpartial/the subdirectory underfooter.html/_footer.htmlFiles with similar names. These files typically contain the code for the website header, footer, and other common areas.
2. How to include HTML tags or multiline content in copyright information?
The 'Global Function Settings' field in the AnQiCMS backend supports HTML content. You can directly enter in this field.<div>Copyright © YourCompany.</div><div>All Rights Reserved.</div>Or any valid HTML tags, they will be rendered according to HTML rules on the front-end page. If line breaks are involved, use<br>Tags or wrapping in block-level elements (such as<div>or<p>) is a common practice.
3. Does AnQiCMS support automatic display of the current year?
Yes, AnQiCMS supports dynamically displaying the current year in templates. You can use built-innowtags to achieve this function. For example, insert in your footer template,{% now "2006" %}It will automatically display the current year (such as 2023, 2024, etc.) when the page is loaded. This is very useful for maintaining the timeliness of the copyright statement without the need to update manually every year.