As a senior CMS website operations personnel, I am well aware that the copyright information at the bottom of the website page is not only an important part of legal compliance, but also a reflection of the brand's professionalism.The AnQi CMS provides a flexible and convenient way for users to manage and display this information.Below, I will give a detailed introduction on how to customize and display the copyright information of the website footer in AnQiCMS.
Customize and display the copyright information of the AnQiCMS website footer
The footer area of a website usually contains important information such as copyright statements, filing numbers, and contact details.This content is crucial for enhancing the professional image of the website, ensuring legal compliance, and providing user trust.The Anqi CMS provides an intuitive and flexible mechanism that allows operators to easily customize and manage the key information displayed in the website footer.
© 2023-{% now "2006" %} YourCompanyName. All Rights Reserved.where,YourCompanyNameReplace with your actual company name and use HTML entity characters.©to represent the copyright symbol.
Next, we need to display these copyright information that has been set up in the background on the frontend of the website.Generally, the footer part of a website is defined in the template file.bash.htmlpublic code files orpartial/footer.htmlsuch code snippet files. You can/templateFind these files in the template folder you are currently using under the directory. Using the built-in template editing feature of AnQiCMS, you can open the corresponding template file for editing.
In the template file, you can call the copyright information set in the background by using specific tags. The Anqi CMS providessystemTags, used specifically to retrieve system global configuration. To display the copyright content you have filled in the "Global Function Settings" in the background, you need to insert the following code snippet:
{% system with name="SiteCopyright" %}
If you need to safely parse the obtained copyright content into HTML (since the backend may have entered HTML tags), you can combine|safeFilter usage to prevent HTML tags from being escaped, ensuring they render correctly.
{{- systemSiteCopyright with name="SiteCopyright" %}{{systemSiteCopyright|safe}}
To keep the year in the copyright statement up to date, you can also make use of the AnQiCMS providednowLabel to dynamically display the current year. This way, you don't need to manually update the year information each year.nowThe usage of the label is{% now "2006" %}where,"2006"is a Go language date formatting string representing the year. Therefore, a common footer copyright statement can be implemented by combining these two, 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 specific copyright requirements, such as needing to differentiate between different copyright holders, specific license information, or more detailed legal statements, AnQiCMS also provides a 'Custom Settings Parameter' feature.You can find this area on the 'Global Function Settings' page.LicenseType/LegalDisclaimer),and fill in the corresponding values.{% system with name="您自定义的参数名" %}You can call and display these additional information in your footer template, for example:
<p>版权所有:{% system with name="CopyrightHolder" %}</p>
<p>许可证类型:{% system with name="LicenseType" %}</p>
By following these steps, you will be able to customize and display the required copyright information flexibly and efficiently in the footer of the AnQiCMS website, ensuring that your website is both professional and compliant.
Common Questions and Answers (FAQ)
1. Where can I find and edit the website footer template file?
In most cases, the footer content of a website is defined in the common files or snippets files within the template theme folder you are currently using. According to the template production conventions of AnQiCMS, you can/templateLook for the current template theme folder under the directory.bash.htmlFile, or inpartial/a subdirectory.footer.html/_footer.htmlFiles named similarly. These files usually contain the code for common areas of the website, such as headers and footers.
2. How to include HTML tags or multiline content in copyright information?
The "Global Function Settings" of AnQiCMS supports HTML content in the "Copyright Information" field. You can directly enter in this field.<div>Copyright © YourCompany.</div><div>All Rights Reserved.</div>[or any valid HTML tag, which will be displayed normally on the front-end according to HTML rendering rules. If line breaks are involved, use]<br>Tags or wrapped 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 dynamic display of the current year in templates. You can use built-innowtags to achieve this feature. For example, insert into your footer template,{% now "2006" %}It can automatically display the current year (e.g., 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 each year.