How to display custom copyright information in AnQiCMS templates?

Calendar 👁️ 68

In AnQiCMS website operation, the footer of the website usually carries important information, where the copyright statement is not only a legal requirement, but also an embodiment of brand professionalism.A clear and dynamically updated copyright information that can enhance the professional image of the website and provide basic protection for the content.In AnQiCMS, managing and displaying custom copyright information on the website is a very intuitive and flexible operation.

Next, we will learn in detail how to set and display your custom copyright information in the AnQiCMS template.


1. Configure the copyright content in the AnQiCMS background.

Firstly, we need to set the copyright statement of your website in the AnQiCMS backend management interface. This process is very simple.

  1. Log in to the backend and navigate to the global settings:Log in to your AnQiCMS backend, find and click on 【Backend Settings】in the left menu, and then select 【Global Settings】.

  2. Enter copyright information:In the [Global Settings] page, you will see a text box named [Copyright Information].In here, you can freely fill in the copyright statement content according to your own needs.For example, you can enter:&copy; 2023 您的公司名称. All Rights Reserved.It is worth mentioning that AnQiCMS allows you to include simple HTML tags in the 【Copyright Information】, such as adding a link to your company's official website or using<strong>The label emphasizes the company name. This provides greater flexibility for displaying copyright information.

    AnQiCMS will save your input content as is and make it available for you to call at any time in the front-end template.


Second, call the copyright information in the template file.

After configuring the copyright content on the backend, the next step is to display it in the website's frontend template. The copyright information is usually located at the footer of the website, so you need to modify the footer file of the template you are using (for examplebash.htmlorfooter.htmlThe specific file path may vary depending on the template you choose to edit.

AnQiCMS's template system uses a syntax similar to Django template engine, throughsystemLabels can easily retrieve various global settings of the background, including the copyright information we just configured.

  1. Basic calling method:To display the copyright content you have filled in the background [Global Settings], just use the following tag code:

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

    This code will directly output the content saved in the background [Copyright Information] input box.

  2. Display the current year:Considering that copyright statements usually need to include the year, and the year needs to be updated every year, AnQiCMS provides a very convenient:nowLabel to dynamically obtain the current year. This way, you do not need to manually modify the year in the template every year. To obtain the current year, you can use:

    {% now "2006" %}
    

    Here"2006"It is the standard reference time used in Go language for formatting date and time, representing the year.

  3. Combined with HTML tags and security filters: If you enter HTML tags in the background's 【Copyright Information】 (for example<a>links or<strong>Emphasize tags), in order for the browser to correctly parse and display these tags, we need to add them an extra call when invoking|safeA filter that tells the template engine that this content is safe and does not need to be HTML-escaped.

    For example, if you entered the copyright information in the background版权所有 <a href="https://www.yourcompany.com">您的公司名称</a>As such, when calling it in the template, it can be written like this:

    {% system siteCopyright with name="SiteCopyright" %}
    <p>{{ siteCopyright|safe }} &copy; {% now "2006" %}.</p>
    

    Here, we first use{% system siteCopyright with name="SiteCopyright" %}Assign the copyright content from the background to a variable namedsiteCopyright, and then<p>Use within tags{{ siteCopyright|safe }}Output and ensure that the HTML content is parsed correctly. At the same time, combine{% now "2006" %}Dynamically insert the current year.


3. Actual application examples

Combining the above knowledge points, a common and professional footer copyright area may look like this:

Assume you filled in the: Copyright Information under the Global Settings in the AnQiCMS backend<strong>我的品牌公司</strong>

Then, in the footer file of your template (such as/template/您的模板目录/bash.htmlYou can write code like this in Chinese:

<footer class="site-footer">
    <div class="container">
        <!-- 动态版权信息 -->
        {% system copyrightInfo with name="SiteCopyright" %}
        <p>
            {{ copyrightInfo|safe }} &copy; {% now "2006" %}. All Rights Reserved.
        </p>
        <!-- 其他页脚信息,例如备案号 -->
        {% system icpInfo with name="SiteIcp" %}
        {% if icpInfo %}
        <p>
            <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{{ icpInfo }}</a>
        </p>
        {% endif %}
        <!-- 友情链接等 -->
        {% linkList friendLinks %}
        {% if friendLinks %}
        <div class="friend-links">
            友情链接:
            {% for link in friendLinks %}
            <a href="{{ link.Link }}" {% if link.Nofollow == 1 %} rel="nofollow"{% endif %} target="_blank">{{ link.Title }}</a>
            {% endfor %}
        </div>
        {% endif %}
    </div>
</footer>

By making such settings, your website footer will be dynamically displayed<strong>我的品牌公司</strong> &copy; [当前年份]. All Rights Reserved.And the filing number, friend links and other information will be automatically presented according to the background configuration, there is no need to manually modify the template code, which greatly improves the maintainability of the website.


Frequently Asked Questions (FAQ)

  1. Q: Why is the copyright information I set in the background not displayed or displayed incorrectly on the front end?A: Please check first whether you have used the correct tags in your template file.{% system with name="SiteCopyright" %}Call it. Also, if your copyright information contains HTML tags, make sure to add them when calling|safea filter such as{{ copyrightInfo|safe }}Finally

Related articles

How to obtain and display the filing number of the AnQiCMS website?

For websites operating in mainland China, the filing number (ICP number) is an indispensable element.It is not only a requirement of laws and regulations, but also an important symbol to enhance the credibility of the website and gain the trust of users.AnQiCMS knows this point and therefore considered convenient management and display of the filing number at the very beginning of system design, allowing website operators to easily complete the configuration. Next, we will together learn how to obtain (configure) and display the filing number on the AnQiCMS website.

2025-11-08

How to display website name and Logo in AnQiCMS?

The website's name and logo are like the face of a brand, they are not only the first impression visitors have of you, but also an important manifestation of the website's professionalism and recognition.In AnQi CMS, setting and displaying your website name and logo is a straightforward and efficient process.Next, we will explore how to perfectly present these key elements on your website. ### First, set up the website name and Logo To make your website have a unique name and Logo, the first step is to configure it in the Anqi CMS backend management interface.1. **Enter Global Settings**

2025-11-08

How to control the automatic lazy loading of images in the article content of AnQi CMS

In website operation, page loading speed and user experience are crucial aspects.Especially for articles that contain a large number of images, the loading of images often becomes the 'culprit' that slows down the page speed.At this time, the image lazy loading (Lazy Loading) technology is particularly critical.AnQi CMS deeply understands this, providing a simple and efficient way to control the automatic lazy loading of images in article content, helping your website to improve performance and user experience.Why is lazy loading of images so important? Lazy loading of images is a strategy of deferred loading

2025-11-08

How to set up an independent template for the single page of AnQi CMS to achieve highly personalized display?

In website operation, we often encounter such needs: some single pages, such as 'About Us', 'Contact Information', or 'Product Download' pages, need to have unique layouts and functions to provide a more unique user experience or carry specific marketing goals.AnQi CMS understands the importance of personalized display and therefore provides a very flexible way for us to tailor exclusive templates for each single page, achieving highly personalized display effects.

2025-11-08

How to display the website's contact phone number and address on the AnQiCMS front-end page?

In website operation, clearly and conveniently displaying the website's contact phone number and address is a key step in establishing user trust and promoting communication and interaction.For friends using AnQiCMS, the system provides a very flexible and intuitive way to manage and display this important contact information.This article will provide a detailed introduction on how to display the website's contact phone number and address on the AnQiCMS front-end page. ### Step 1: Enter contact information in the AnQiCMS backend Firstly, we need to ensure that the contact information of the website has been correctly entered in the backend.This is the foundation for displaying this information on the front end

2025-11-08

How to dynamically display the website's homepage TDK information in AnQiCMS?

The TDK of a website, which stands for Title (title), Description (description), and Keywords (keywords), is a basic element of Search Engine Optimization (SEO), which directly affects the display effect and user click intention of the website in the Search Engine Results Page (SERP).For the "face" of the website - the homepage, accurate and attractive TDK information is crucial.In AnQiCMS (AnQiCMS), managing and dynamically displaying the TDK information of the website homepage is a straightforward and efficient task

2025-11-08

How to build and display a multi-level navigation menu in AnQiCMS template?

The website navigation is the first window for users to interact with the website. A clear and intuitive navigation system can greatly enhance the user experience and help visitors quickly find the information they need.AnQiCMS provides a flexible and powerful navigation management function, whether it is a simple single-level menu or a complex two-level, three-level, or even more hierarchical multi-level navigation, it can be easily realized.Next, we will learn in detail how to build and display multi-level navigation menus in AnQiCMS.## Backend Settings: The Foundation of Navigation Construction Navigation construction in AnQiCMS begins with careful configuration in the backend

2025-11-08

How to use the breadcrumb navigation tag of AnQiCMS to display the current page path?

In website operation, a clear navigation path is crucial for user experience and search engine optimization (SEO).A Breadcrumb Navigation is an auxiliary tool that can significantly improve the usability of a website, providing a quick and convenient way for users to return to their previous page and clearly indicating their position on the current page.In AnQiCMS, implementing breadcrumb navigation is very simple and flexible.AnQiCMS provides us with a dedicated breadcrumb navigation tag `breadcrumb`, through it

2025-11-08