How to dynamically display

Calendar 78

Display the filing number at the bottom of the website, which is not only a requirement for compliance with relevant laws and regulations, but also an important factor in enhancing the professionalism and user trust of the website.For users using AnQiCMS, dynamically displaying the filing number through the built-in powerful functions of the system is a very convenient operation, which does not require frequent code modifications and greatly improves the maintenance efficiency of the website.

Set the record number content in the background

First, we need to set your website filing number in the Anqi CMS backend management interface. This is the basis for all dynamic display content, ensuring the accuracy of the information.

After logging in to the backend, find the left navigation bar and click on the "Backend settingsthen click onGlobal Settings". In the global settings page, you will see a name called the "Record numberThe input box. Just fill in your website filing number here, for example, 'Guangdong ICP No. 12345678'.Please note that in most cases, you only need to fill in the main part of the filing number and do not need to add a suffix like “-1”.

After filling in, remember to click the button at the bottom of the page "Save”Button, enable the settings. In this way, the content of the record number is successfully stored in the system.”

Dynamically call the record number in the website template

The registration number content has been saved in the background, and the next step is to display it on the website's front end.In most cases, the filing number will be displayed in the footer (Footer) section of the website.In AnQi CMS, the common parts of the website such as headers and footers are generally concentrated in the template directory.bash.htmlor independentpartial/footer.htmlin such files.

AnQi CMS provides a very convenient system setting tagsystemWe can use it to dynamically obtain various system information from the background settings. For the filing number, we can useSiteIcpThis specific field name is to be called.

You can find the appropriate location in the footer HTML code and insert the following code snippet:

<div class="footer-icp">
    备案号:<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a>
</div>

Let's take a simple look at this code:

  • {% system with name="SiteIcp" %}This line of code is crucial. It tells AnQi CMS to retrieve the global settings from the background.SiteIcp(i.e., the record number) field value, and display it here.
  • <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">...</a>We recommend enclosing the filing number in a<a>tag. This has several advantages:
    • href="https://beian.miit.gov.cn/"This is the official Ministry of Industry and Information Technology filing query website, providing users with a convenient query entrance, which increases the transparency and credibility of the website.
    • rel="nofollow"This is a SEO** practice. It tells search engines not to pass link weight to this external link because it is an administrative link, which usually does not belong to the core content of the website.
    • target="_blank"When the user clicks the filing number, the filing query website will open in a new tab to avoid the user leaving the current website and improve the user experience.

Paste this code into the appropriate position in the HTML footer of your website and save the modified template file.

Verification and cache refresh

After completing the template modification, save the file and visit the front page of your website. You should be able to see the dynamic display of the filing number at the bottom of the website.

If the record number does not display immediately, or the displayed content is outdated, don't forget to clear the website cache.The AnQi CMS backend is usually at the top of the page or near the "System Upgrade" module, where there is a function to "Update Cache" or "Clear Cache", just click it.At the same time, it is also recommended to clear the cache of your browser itself (usually press Ctrl+F5 or Command+Shift+R to force refresh the page and clear the cache).

Through the simple and intuitive backend settings of AnQi CMS and the powerful template tag functions, dynamically displaying the website filing number becomes effortless.This practice not only complies with the regulations, but also makes your website maintenance more efficient and convenient, allowing you to update the filing information without touching the code, so that you can focus more energy on content operation.


Frequently Asked Questions (FAQ)

1. Why am I still not displaying or displaying old information on the front page after setting the filing number according to the steps?

This is usually caused by caching. First, make sure you have saved the record number in the "Global Settings" of AnQi CMS backend, and the template file has also been saved.Then, be sure to clear the security CMS system cache and try to force refresh your browser cache.If the problem still exists, please check if you have placed the code in the correct template file (usually related to the footer)bash.htmlorpartial/footer.htmlAnd in{% system with name="SiteIcp" %}label'snameIs the parameter spelled correctly?SiteIcpCase-sensitive).

2. Do I need to modify the template code if the website filing number is updated?

Completely unnecessary! This is the advantage of using Anqi CMS to dynamically display the filing number.When your record number changes, you just need to log in to the Anqi CMS backend, go to “Background Settings” -> “Global Settings”, find the “Record Number” text box, update it to the new record number and save.The system will automatically update the front-end display, you do not need to modify any template code.

3. Can I use a similar method to dynamically display other footer information besides the filing number?

Of course. Anqi CMS'ssystemThe tag is very flexible. For example, you can{% system with name="SiteCopyright" %}display the copyright information configured in the background “Global Settings”. In addition,contactTags such as{% contact with name="Cellphone" %}) Can dynamically display contact information, email, etc. For some content that does not belong to the system default settings but is still desired to be centrally managed and dynamically displayed, you can also add through the "Custom Settings Parameters" in the "Global Settings" and then usesystemlabel'snameSpecify the parameter name you define to call it.

Related articles

`add` filter combined with `default` filter to set default values for variables that may be empty before concatenation?

In the daily operation of AnQi CMS, we often need to concatenate different field content to form a complete information, such as generating a complete address or combining an attractive product title.However, a common challenge with dynamic content is that some variables may be empty.If concatenated directly, the blank content not only affects the appearance but may also lead to missing information or disordered format.Fortunately, AnQiCMS's powerful Django template engine grammar provides us with a flexible solution

2025-11-07

How to dynamically generate a link to the comment area based on `item.Id` in `archiveList`?

In AnQi CMS, in order to enhance the user experience of the website, we often hope that users can quickly find the specific content on the page.For example, when you click on the "View Comments" link next to an article title on a document list page, you can directly jump to the comments section of the article detail page.This not only saves users time, but also makes interactions more direct. Today, let's discuss how to dynamically generate anchor links to comment sections in the `archiveList` loop based on the unique identifier `item.Id`.

2025-11-07

How to combine other filters with the `add` filter to ensure safe concatenation and prevent XSS attacks when processing user input?

In AnQi CMS, managing website content involves entering a variety of information regularly.Whether it is the main text of the article, user comments, or form submissions, this user-generated content injects vitality into the website while also bringing potential security risks, the most common and severe of which is XSS (Cross-site Scripting attack).This article will discuss how the `add` filter works in processing user input content, how it协同acts with other security filters to build a strong defense line, effectively preventing XSS attacks.

2025-11-07

How to use the `add` filter to dynamically add a uniform prefix or suffix to the single page titles in the `pageList`?

In Anqi CMS, content management is not limited to the backend's add, delete, modify, and query, but also manifests in the flexibility and diversity of front-end display.In the face of common single-page websites (such as "About Us", "Contact Us", etc.), sometimes we hope that they can be unified with specific identifiers when displayed in lists or navigation, such as If you modify the background title one by one, it is not only inefficient but also lacks uniformity and maintainability.At this time, utilizing the powerful template engine function of AnqiCMS, with the clever filter

2025-11-07

Can the `add` filter be used to concatenate CSS style strings to implement dynamic inline styles?

AnQiCMS with its flexible and powerful template engine provides great convenience to users, allowing content presentation to be highly customized according to actual needs.In daily template development, we often encounter scenarios where we need to dynamically adjust the page display based on backend data, such as changing the title color based on the article reading volume, or displaying different background styles based on user permissions.At this point, we might wonder whether the built-in `add` filter of AnQiCMS templates can be used to concatenate CSS style strings to achieve these dynamic inline style controls

2025-11-07

How to dynamically add language parameters in the `add` filter of the `languages` tag that returns multilingual site links?

Under the flexible multi-language support of AnQiCMS, providing content to users worldwide has become very convenient.The system built-in `languages` tag can easily list all the language versions supported by your website and their corresponding links.However, in some scenarios, we may not only want to provide language switching functionality, but also dynamically add additional parameters to these multilingual links, such as for marketing tracking, A/B testing, or loading personalized content in specific languages.

2025-11-07

How to use the `add` filter to dynamically add navigation arrow symbols to the titles of `nextArchive` or `prevArchive`?

In website content operation, the subtle aspects of user experience often determine the overall effect.For the article detail page, if the "Previous" and "Next" navigation at the bottom of the page can be designed more intuitively, it will undoubtedly greatly improve the user's browsing efficiency and comfort level.This article will discuss how to utilize the powerful template function of Anqi CMS, especially the `add` filter, to dynamically add arrow symbols to these navigation titles, making them clear at a glance.Understand the requirement: Why to dynamically add navigation arrows?Imagine when the user has finished reading an excellent article

2025-11-07

How to implement the dynamic combination output of the `add` filter in the custom `diy` tag?

In AnQi CMS, content operation not only seeks accurate transmission of information, but also flexibility and automation of expression.We often encounter such needs: we hope to combine some independent content preset by the background with dynamic data on the page or fixed text in a clever way, forming a complete and creative expression.Today, let's delve deep into how the `add` filter and custom `diy` tags work together in Anqi CMS to help us achieve this dynamic combination of content output.### `diy` label: your content treasure box first

2025-11-07