How to dynamically display copyright information and the current year at the bottom of a website or other areas?

Calendar 👁️ 88

In website operation, keeping information updated is an important part of maintaining a professional image, and the copyright year at the bottom of the website is often overlooked. Manually updating it every year is not only cumbersome but also prone to omissions. 幸运的是,using Anqi CMS, we can easily implement the dynamic display of copyright information, so that the information at the bottom of the website is always up-to-date.

Why is dynamic copyright information so important?

Imagine visiting a website where the bottom prominently displays the copyright year from several years ago.This may make the website look outdated and may leave a bad impression of unprofessionalism.For content operators, every modification means extra workload.Dynamic display of copyright year and information, the benefits are self-evident:

  • Maintain professionalism and timeliness:Automated updates ensure that the website always presents the latest information, maintaining the professional image of the company or brand.
  • Relieve operational burden:Say goodbye to the hassle of manually modifying the copyright every year, and focus your energy on more valuable content creation and marketing activities.
  • Improve user experience:Visitors will feel the vitality and maintenance of the website, enhancing trust.
  • Slight SEO benefit:Although trivial, continuously updated page content is also a positive signal of website activity to search engines.

AnQi CMS is a modern content management system developed based on the Go language, which provides strong support for content operations with its high efficiency, customizability, and easy scalability.It has a flexible template engine and rich built-in tags, which is the core tool for us to implement dynamic copyright information.

Implement step by step dynamic copyright year and information display

Next, we will go through several simple steps, using the template tag function of Anqí CMS, to dynamically display copyright information and the current year at the bottom of the website or other areas.

Step 1: Locate the template file

The template files of AnQi CMS are usually stored in/templateUnder the directory. To achieve a unified display of copyright information throughout the website, we usually modify the public footer file of the website. This file is usuallybash.html(Used to define common inherited parts such as headers and footers), or find a file named in your template theme directoryfooter.htmlor a file with a similar name, which contains the website footer code.

If you are not sure which file it is, you can find and open the HTML file most likely to contain footer code in the "Template Design" area of the background management interface through the online editing feature.

Step two: Insert the current year label

Anqi CMS provides a very practicalnowLabel, you can directly output the current time. To display the current year, you just need to specify the format.

In the footer template file you find, replace the position where the year needs to be displayed with the following code:

{% now "2006" %}

Here2006It is a specific time format string used in Go language to represent the year. This tag automatically retrieves and outputs the current year.

Step 3: Display custom copyright information

In addition to the year, we usually need to display the copyright statement of the website, the website name, and other information.The Anqi CMS provides the "Global Function Settings" in the background, which includes the "Website Name" and "Copyright Content" fields for easy unified management.We can go throughsystemLabel to retrieve this information.

In the footer template, you can use the following tags to get the website name and the copyright content set in the background:

{% system with name="SiteName" %}

This will display the website name set in the background.

{% system with name="SiteCopyright" %}

This will display the copyright content you entered in the background "Global Feature Settings".

If your copyright content may contain HTML tags (for example, to bold or add links), to ensure that these HTML tags are parsed correctly by the browser rather than displayed as plain text, please outputSiteCopyrightUsed at|safefilter.

{% system siteCopyrightText with name="SiteCopyright" %}{{ siteCopyrightText|safe }}

Here we will assign the copyright content tositeCopyrightTextthe variable, then through|safeFilter output.

Fourth step: integrate and improve the bottom area

Now, we combine the year label and the copyright information label to build a complete bottom copyright area.A common copyright format is “© [current year] [website name]. All Rights Reserved. [custom copyright content]”.

You can integrate it like this in your footer template file:

<div class="footer-copyright">
    &copy; {% now "2006" %} {% system with name="SiteName" %}. All Rights Reserved.
    {% system siteCopyrightContent with name="SiteCopyright" %}{{ siteCopyrightContent|safe }}
</div>

This code snippet will dynamically display the current year, followed by the website name set in your background, then the common 'All Rights Reserved.', and finally the copyright supplement information customized in your background.

Step 5: Save and Preview

After the modification is completed, please save your template file. If you are editing online in the background, usually clicking save will take effect.If you modify the file via FTP or other methods, you may need to clear the AnQi CMS system cache (in the "Cache Update" function of the background management interface), then refresh the website frontend page, and you will see that the copyright information at the bottom has been dynamically updated.

Tip: Personalize your copyright information

Go to the Anqi CMS backend,Backend Settings -> Global Function SettingsYou will see the "Website Name" and "Copyright Content" fields.Here, you can modify the website name according to your actual needs and flexibly edit the copyright content.For example, you can add the company name, record information link, and even some brief promotional language. Through|safeFilter, you can even use HTML tags directly in the "Copyright Content" field to achieve richer styles and links.

Summary

By using the simple and powerful template tag system of AnQi CMS, it becomes extremely simple to dynamically display copyright information and the year at the bottom of the website.This not only greatly improves the maintenance efficiency of the website, but also keeps your website always professional and up-to-date.Encourage you to explore more flexible features of Anqi CMS, making website operation more skillful.


Frequently Asked Questions (FAQ)

Why does my website's footer year not update immediately after modification?

A1: This is usually due to website caching. In the Anqi CMS backend, try clicking the 'Update Cache' button to clear the system cache, then refresh your website page.If there is still no update, please check whether the template file you have modified is the correct common footer file, and confirm that the modification has been saved successfully.

Can I add links or images in the 'Copyright Content'?

A2: Yes, the 'Global Function Settings' in Anqi CMS backend supports entering HTML code, including links (<a>tags) and images (<img>Label). To ensure that this HTML code is correctly parsed on the front-end page, please make sure to output it in the template.SiteCopyrightUsed at|safeFilter, for example{{ siteCopyrightContent|safe }}.

Q3: If I use Anqi CMS to manage multiple sites, do I need to set the copyright information separately for each site?

A3: Yes, Anqi CMS supports multi-site management, each site is independently configured.You need to log in to the backend of each site, then in the "Global Function Settings" of each site, set its "Site Name" and "Copyright Content" separately to achieve personalized management.

Related articles

How to correctly render Markdown document content as HTML in a template?

Content creators often choose Markdown as their preferred tool because it can organize content in a concise and clear manner, while also easily achieving formatting effects.However, simply inputting content in Markdown format in the background is not enough to allow the website front end to display it correctly. We need some additional steps to ensure that the content is rendered correctly as HTML.This article will introduce in detail how to make Markdown content turn beautiful in AnQiCMS templates, presenting it to users in the form of HTML.### One

2025-11-09

How to optimize the display format of text and numbers using AnQiCMS filters (such as truncatechars, floatformat)?

How to make information concise, clear, and professional in website content operation?This is often a challenge faced by many operators. Whether it is a news summary, product description, or price data, statistics, if displayed in a disorganized manner, it not only affects user experience but may also lead to deviations in information transmission.AnQiCMS (AnQiCMS) fully understands this pain point, its powerful template engine built-in a series of practical filters, which can help us easily optimize the display format of text and numbers, making your website content look brand new.Refined text

2025-11-09

How to view the content that has been crawled and accessed in the website traffic statistics and crawler monitoring data?

Manage a website, what we care most about is whether our content is seen by users and whether it is indexed by search engines.This data is like the pulse of the website, directly reflecting the health of content operation and the activity of the website on the Internet.AnQi CMS knows these core needs and has built practical traffic statistics and spider monitoring functions, allowing us to easily master the key performance indicators of the website.Why are we so concerned about traffic and crawler data?In short, paying attention to these data is to better understand and optimize our website. First

2025-11-09

How are the "recommended properties" (such as headlines, slides) used to control the special display positions on the homepage or list?

In content operation, we often need to highlight specific content on the website, such as the latest news, popular articles, or important product recommendations.AnQi CMS provides a very practical feature - "Document Recommendation Attribute", which can help us easily achieve these diverse content display needs, making the website more attractive. ### Flexible and diverse document recommendation attributes When we enter the Anqi CMS backend to edit or publish documents, we will notice an option called "recommendation attributes".This provides a variety of preset identifiers, as if tagging the content with different labels

2025-11-09

How to automatically convert multiline text content to HTML format with <p> or <br> tags for display?

In website content display, we often encounter such needs: multi-line text edited in the background can be automatically converted into a format with HTML paragraph tags `<p>` or line break tags `<br>` on the front-end page, rather than simply being compressed into a long string of text.AnQiCMS provides a flexible and powerful method to solve this problem, whether it is through built-in editor features or by using template filters for precise control, it can be easily realized.### One, use the content editor to achieve automatic conversion When you go through AnQiCMS

2025-11-09

How to ensure that the URL strings in the content are automatically converted into clickable hyperlinks?

In daily website content operations, we often need to include various links in articles or descriptions, whether they point to other pages within the site or external references.One of the key aspects of user experience is that these URL strings can be automatically turned into clickable hyperlinks, rather than a series of cold texts.AnQiCMS (AnQiCMS) fully understands this and provides a variety of flexible and efficient methods to help us ensure that URLs in the content can be intelligently converted into clickable hyperlinks.Next, we will discuss how to achieve this goal in AnQiCMS

2025-11-09

How to use the 'safe output' mechanism of AnQiCMS template to avoid HTML content from being escaped?

In website content management, we often need to display various text information on the page, including HTML content with specific formats or interactive effects.AnQiCMS (AnQiCMS) is a modern content management system that, by default, takes an important security measure when handling template rendering: automatically escaping HTML content.This mechanism is designed to prevent cross-site scripting (XSS) attacks and ensure website security.However, in certain specific scenarios, such as when we want to display formatted content edited by a rich text editor, or custom HTML code snippets

2025-11-09

How do user group management and VIP systems affect the access permissions and display of specific content?

How to allow different users to see different content on a website, even charging for some high-value content, is the key to enhancing the value of the website and achieving monetization.AnQiCMS provides powerful and flexible features in user group management and VIP system, helping us achieve refined content distribution and differentiated display. ### Understanding the Core Value of User Groups and VIP Systems In Anqi CMS, user group management is the foundation for building personalized content experiences.

2025-11-09